Blogs

Update Sharepoint list item from Powerapps gallery

Update SharePoint list item from Power Apps Gallery:

This article describes how to Update SharePoint list items from Power Apps Gallery using the Patch function.

The Scenario is – if you want to update any column for ex: status column (Accepted/Rejected/Pending) from Power Apps Gallery Item, here are the simple steps.

Note that the status column may be a single line of text or choice field type, we will cover both cases.

Also, note that we need not maintain IDs to lookup the status column based on ID and update.

Steps:

Step1: SharePoint List Setup:

Firstly, we create a list in SharePoint Online with all required columns.

Step2:

Once the SharePoint list is ready, create a Canvas App in Power Apps.

Step3:

Open Canvas App, and the screen having the Gallery where we need to update the Status column.

Step4:

Use the below formula for save button to update status if it is a single line of text type.

Patch(
Updatecolumnlist, Gallery1.Selected,
{
Status: Dropdown1.Selected.Value
}
);
Patch (
Updatecolumnlist, Gallery1.Selected,
{
Status: {
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
Id: 1,
Value: Dropdown1.Selected.Value
}
}
);

Use the below formula for save button to update status if it is choice type.

  • Article subcategory (Please refer to MT website blog categories) –

Patch function:

https://www.mouritech.com/article/power-apps-patch-function-for-form-edit-in-power-apps

  • Purpose of the Article  Knowledge sharing
  • Intended Audience – BI Developer using Microsoft Power Apps Tool.
  • References / Sources of the information referred –

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch

Contact for further details:

Mary Margaret THUMMA
Associate Team Lead – Data Visualization -Analytics
MOURI Tech

Leave A Comment

Related Post

WordPress REST APIs

Purpose of the Article: To Learn about WordPress Rest APIs Intended Audience: PHP Developers Tools and Technology: WordPress Keywords: WordPress Rest API What Is API?

Read More »

Secure Browsing

Purpose of the Article: How to Browse the Internet safely? Intended Audience: Whoever uses the Internet. Tools and Technology: Cyber Security Keywords: Cyber Security, Data

Read More »