When you look at using Patch to update an item, you might also want to consider using Update or UpdateIf.
Create an item with the Patch function
But what do you do if you now want to get the details of the item that you just created. It would be helpful if you could collect the data created without having to query your data source.
Today I discovered that the Power Apps Patch function returns the item created. So that means that I can set a variable.
Using Power Apps Patch to create a SharePoint list item 2
This variable can then be used to get the ID of the list item.
Using Power Apps Patch to create a SharePoint list item 3
Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like.
I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide.
For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions.
SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/
Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/
You can contact me using contact@sharepains.com
3 thoughts on “Using Power Apps Patch to create a SharePoint list item”
Hi Pieter Veenstra,
Based on your many experiences using Sharepoint List/ Flow,
What would be less error-prone to create some Items from Powerapps , Patch directly or via Flow create item/ Send HTTP request? Because sometimes Patch 10 items at the same time takes very long time for user on mobile connection
Interesting question. I might create a post on that soon.
First of all when you use the patch you should use it in combination with a Set so that you collect the result. This may help with error handling in Power Apps.
Thee isn’t a straight forward answer to the question if Flow or Power Apps is better at updating data. Flows happen in the back ground unless you collect a result back. So that might be good, however when flows update the data you will find yourself refreshing data in your PowerApps more often.
Hi Pieter Veenstra,
Based on your many experiences using Sharepoint List/ Flow,
What would be less error-prone to create some Items from Powerapps , Patch directly or via Flow create item/ Send HTTP request? Because sometimes Patch 10 items at the same time takes very long time for user on mobile connection
Interesting question. I might create a post on that soon.
First of all when you use the patch you should use it in combination with a Set so that you collect the result. This may help with error handling in Power Apps.
Thee isn’t a straight forward answer to the question if Flow or Power Apps is better at updating data. Flows happen in the back ground unless you collect a result back. So that might be good, however when flows update the data you will find yourself refreshing data in your PowerApps more often.
Further to my previous comment. You might also want to look at UpdateIf. It is faster than Patch.