Development Of An Information System Using Microsoft PowerApps - Part Three

Introduction

 
This is an article about the development of any type of Information System using Microsoft PowerApps. In this article, I am going to create an Information System. This concept can be used to create various Information systems like Employee Information, Student Information, Vendor Information, Seller Information, etc. For developing the Information System, it is required to design a form that will be filled by the end User in Microsoft PowerApps. The data will be saved in a Share Point List.
 
Requirements
  1. Microsoft PowerApps
  2. Share Point Online
  3. Automate Flow
Developing this Information System requires the following steps to work out. I will segregate the steps into small parts in different articles which will make you understand every concept and will give steps to work upon.
  1. Creating a Share Point List (Part 1)
  2. Design a Form using Microsoft Power Apps Designer (Part 2)
  3. Connect the data of the designed Form with its corresponding Sharepoint List using Microsoft PowerApps Forumale and functions (Part 3)

Connect the Data of the Designed Form with the Corresponding Sharepoint List using Microsoft

 
PowerApps Forumale and Functions
 
Step 1 - Adding Share Point List as the Data source of the Microsoft Power Apps
 
The below images will show how to connect with data sources from Microsoft Power Apps. From the Control Panel, Click on View and select Data Sources
 
Development Of Information System Using Microsoft PowerApps
 
Select Connectors
 
Development Of Information System Using Microsoft PowerApps
 
Select Share Point for the Share Point List
 
Development Of Information System Using Microsoft PowerApps
 
Choose your Share Point list
 
Development Of Information System Using Microsoft PowerApps
 
Here, it shows your data source is added.
 
Development Of Information System Using Microsoft PowerApps
 
Step 2 - Use of Power Apps functions and formulae
 
Overview of the User Information Form designed by Microsoft Power Apps Designer
 
Development Of Information System Using Microsoft PowerApps
 
In this designed form, as per the User's requirement “First Name” & “Last Name” is given in two Text Inputs and Full Name will be the combination of "First Name" & "Last Name"
 
For the below function, you can use the below function in Power Apps
 
Concatenate Function
 
The Concatenate function concatenates a mix of individual strings and it's equivalent to using the & operator Syntax
 
Syntax
 
FirstName & " " & LastName
or
Concatenate( FirstName, " ", LastName )
 
Set the "Text" property of the Label Full Name Concatenate( FirstName.Text, " ", LastName.Text)
 
Development Of Information System Using Microsoft PowerApps
 
After applying the formula of concatenate, preview the app and the result will be like the image shown below:
 
Development Of Information System Using Microsoft PowerApps
 
Formula to add data of Radio button
 
In the given Form, Gender is the Radio button
 
Syntax
 
Choices('datasource'.Radioname)
 
Set the "Item" property of the Radio (Gender) Choices('User Information Form'.Gender)
 
Development Of Information System Using Microsoft PowerApps
 
Formula to add data of Combo Box
 
In the given form, State is the Combobox
 
Syntax
 
Choices('datasource'Comboboxname)
 
Set the "Item" property of the Dropdown(State) Choices('User Information Form'.State)
 
Development Of Information System Using Microsoft PowerApps
 
To add the value of Text Input, data will be filled by the End-user and can be updated by Share Point List using Patch Function
 
Use the Patch Function in Microsoft PowerApps to Save and Update the Value
 
Patch
 
Modifies or creates one or more records in a data source, or merges records outside of a data source.
 
Syntax
 
Patch( DataSource, BaseRecord, ChangeRecord1 [, ChangeRecord2, … ])
  • DataSource – Required. The data source that contains the record that you want to modify or will contain the record that you want to create.
  • BaseRecord – Required. The record to modify or create. If the record came from a data source, the record is found and modified. If the result of Defaults is used, a record is created.
  • ChangeRecord(s) – Required. One or more records that contain properties to modify in the BaseRecord. Change records are processed in order from the beginning of the argument list to the end, with later property values overriding earlier ones.
Set the "On Selct " property of the Submit Button and add the below formulae to update the user Input in the Share Point List.
  1. Patch('User Information Form', Defaults('User Information Form'), {  
  2.     Title: Now(),  
  3.     FirstName: FirstName.Text,  
  4.     LastName: LastName.Text,  
  5.     FullName: Full_Name.Text,  
  6.     Gender: {  
  7.         '@odata.type'"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",  
  8.         Id: 0,  
  9.         Value: Gender_Radio.Selected.Value  
  10.     },  
  11.     Adress: Address_Input.Text,  
  12.     State: State_Input.Selected,  
  13.     Country: Country_Input.Text,  
  14.     'Phone Number''Mobile no'.Text,  
  15.     Email: email.Text,  
  16.     Password: password.Text,  
  17.     Date: DatePicker1.SelectedDate  
  18. })  
The below image shows Patch Function used to update the record or data source:
 
Development Of Information System Using Microsoft PowerApps
 
Preview the app on the top right corner of the screen, fill the form.
 
Development Of Information System Using Microsoft PowerApps
 
Click the submit button to save the data in the Share Point List.
 
Development Of Information System Using Microsoft PowerApps
 

Conclusion

 
In this article, we learned how to connect the data source in Microsoft Power Apps. We understood the use of the Concatenate function and Formulae to save and update the data in a Share Point List using the Patch Function. 
 
Thank you. I hope you will enjoy the series...


Similar Articles