Get item using Patch and Set functions

Using Patch to create a SharePoint list item in Power Apps

You can use the Patch function in Power Apps to create a SharePoint list item.

The basic Patch command users to update a list item in SharePoint

This is quite easy and documented on the Patch function page.

But what do you do if you now want to get the details of the item that you just created.

Today I discovered that the Patch function returns the item created. So that means that I can set a variable.

The basic Patch command but this time the Set function is used to set a variable to the created item.

This variable can then be used to get the ID of the list item.

The IS from the created item is now available with NewItem.ID

You could now for example use this item id to update another datasource with the ID in SharePoint.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: