Brook Preloader

Blog

Power Apps Patch Function for Form (Edit) in Power Apps.

Introduction: 

This article describes how to use the patch function in Power Apps Form (Edit). 

SharePoint List Setup: 

First, create a list in SharePoint Online/Office 365 with all required columns. I have considered these filed types because these fields are a bit tricky to patch/update it in SharePoint via PowerApps. 

Once the SharePoint list is ready, create a new app (Canvas- Tablet view) in PowerApps. 

Steps: 

1. Create SharePoint List with Required Columns or Fields (Note: We have to give some name of that created list EX: (Stumbling)).

2. Create Canvas App through Based on SharePoint list (or) directly go through the power apps and create a New Canvas App.

3. Connect the Created SharePoint list (Stumbling) into Power Apps through the Connectors. 

4. Take the Blank screen in power apps and add the Form (Edit) to the screen.

5. And connect the Data source (SharePoint list Stumbling) to the Form. 

6. Take one button (Add Problem) on the screen below the Form. 

7. For this button we need to write the patch function (when we entered the values into the form the values should go and store in a created SharePoint list according to their respective fields) through the power apps. 

Button (Add Problem) –On the Select property, we need to write the patch function. 

**Note: formula – Patch (Data source Name, Defaults (Data Source Name), {Fields}): 
                – Fields is nothing but SharePoint list column names along with their Data card values in the form. 
Ex: Patch ( 
    Stumbling, 
    Defaults (Stumbling), 
    { 
        Title: DataCardValue4.Text, 
        Adcol: Button2_1. Text, 
        Description: DataCardValue5.Text, 
        Email: DataCardValue6.Text, 
        'Add Image': ImageBinary 
    } 
); 

8. After writing the Patch function we need to enter all the details and click on the Button (Add problem). 

9. Next open the SharePoint list which we have created (Stumbling) and check all entries we entered in the forming through the power apps. 

Contact us for Further Details

Adi Lakshmi Duggi
Associate Software Engineer
MOURI Tech

5 1 vote
Rating
guest
0 Comments
Inline Feedbacks
View all comments