Stop using Power Apps to bulk update SharePoint use Power Automate Instead

preview_player
Показать описание
In this video, you will learn how to update your data source like SharePoint using bulk update methods. ForAll is great but slow so instead we learn to use the JSON function to format our collection and then send it to Power Automate flow to Parse the JSON and then Apply to each. A much faster method that avoids your users from having to wait.

0:00 PowerApps Bulk Updates
1:18 Demo of Patch vs. Power Automate flow speed
3:00 Review what not to do and overview of the process
6:05 Create the collection to update from
7:32 Create a flow to bulk update your data source using Compose, Parse JSON, Apply to Each, and Create Item
13:20 Refresh your Power Automate flow in your Power Apps app
14:47 A couple of things to think about when using this method for Bulk Updates

Рекомендации по теме
Комментарии
Автор

Shane, it was a pleasure meeting you at the workshop in the conference last week. Thanks for your time and for answer all my questions.

edgarmartinez
Автор

Thanks for the video. It was great meeting you at MCPP last week. I was one of the people who won the gift card! Sharing your videos with my staff!

corykennedy
Автор

I'd keep your video on, it makes it more personal, one of the reasons why your content is where I keep going back too.

spageBIM
Автор

+1 for keeping your mug on screen. Great video! I've passed a collection to Power Automate for handling a bunch of file attachments, never thought about applying that to handle a batch of data records. Good tip!

angrybatvoice
Автор

Starting the flow may take less time than executing the Patch function, but the flow will run much longer than the Patch function does. Also, the patch in your example makes a single call to SharePoint, while your flow makes a different call for creating each item, which can lead to throttle error as well as overconsumption of your daily billable action quota, which in turn can lead to your flow being slowed down or even disabled by Microsoft. In general I would say let the user wait for the Patch function to complete, maybe display a spinner gif while it's executing. If you still want to use flow, couple of remarks: replace the trigger with PowerApps v2, so you can specify the required parameter(s) without having to use a separate Compose action. You can also get rid of the Parse JSON action by nesting the parameter value in the JSON expression function which doesn't require a schema (the only downside is that you have to specify field names manually in subsequent steps, can't pick them dynamically). To perform bulk SharePoint operations with flow, always use the 'send http request' action with batch API, build the body by using the select action, never with apply to each. Not low code, but the only method that works reliably for the long term with huge amount of data.

bgergoe
Автор

I use ForAll mostly. Secondly, Shane, I appreciate your PowerApp videos here. I just discovered an easier way to upload attachments to share point list using patch function, no flows, easiest way.

Mr-Nun
Автор

Thanks again, Shane. This is a major performance improvement on my app that has to check for existing. The flow processed it so much faster than the ForAll with Patch. Also, now the user can choose to wait for the app response, but does not have to since I have the flow sending a notification and updating an SP bulk changes audit log list.

darlenesuarez
Автор

Awesome video as always! You could also speed up the Flow by turning on concurrency in the apply to each loop (assuming you don't need to create those records sequentially).

williamdunn
Автор

Seeing your face is helpful .. your expressions are what help identify important/key steps.

cbtjoe
Автор

You can replace the for each loop with a http request to sharepoint and do the bulk update with a single post. This is so much faster than updating or inserting items one by one. Also, by not sending a response back to powerapps, the user will not know if the flow fails for whatever reason. I think therefor its always best to include the response with the result status of the flow and show the user if it was processed successful or not.

ribizzle
Автор

Hi Shane, thank you for all these cool tricks. Can you also post a video on best practices to avoid issues when multiple users are writing to a sharepoint list via powerapps.

diabloever
Автор

Nice, you can also use the ParseJson keyword in PowerApps to store all data in key value pair and send that to flow create or update item,

Also if data is in bulk but mostly 10 to 20 records then Patch(list table, collection table or variable table name) where both having same schemas can help immediately patch items, if no ID it will add new record, if there is ID it will update same record

Saif_Ali_Khan_
Автор

Pro Tip: Edit the settings of the "For All" action in flow and turn concurrency on for increased performance. Not turning that on for larger record counts would be fairly slow. Honestly surprised the 100 example was as fast as it was unless you had set that setting?!

chriswebbtech
Автор

Thanks for the video! It seems a little misleading to compare the patch and the flow, because of the caveat you snuck in at the end. The bulk patch is a complete statement--create the records, respond to the app with success, and update the datasource cache to include the records. I believe that method is still faster than doing the same with a flow. You compared using flow to just create the records vs. the full solution of patch. The real comparison would be waiting for a response from the flow, then refreshing the datasource. I'm sure that would be slower than a bulk patch. Ultimately depends on if you need to immediately know those records or not.

TheFlowHawk
Автор

Thanks for another awesome video. I miss the face

oluwatobiyusuf
Автор

Is the only way to make sure the refresh is AFTER it is complete is by sending a response back and making the user wait? I have a Flow that uploads images to SP, but often my refresh fires before all the actions have happened. Thoughts?

spageBIM
Автор

Thanks Shane, great video bro!! you get things done fast an easy. I was wondering if is it possible to use this bulk update method to insert new records with attachements in sharepoint list?? hope you could read my message.

albenjr
Автор

Hi Shane, I have two excel files which I am trying to bulk upload to sharepoint or dataverse and I'm struggling with a lookup column. The CDS does not list the lookup column in the target destinations to map the columns

dvspriest
Автор

Excellent video!
But will it work if I use an Update Item action to update a child database. Example I am updating a parent database and some of those columns I want to update into child database. Therefore I will only have the parent ID column in the child database and I won't have its own ID column.

charlesdawnbeltran
Автор

Thanks for this Shane. All of the videos I find about Patching back to SharePoint seem to assume I have a bunch of NEW records. What if I collect a bunch from SharePoint (say comments) and then the user adds a comment to the collection. When I patch back in this way, it duplicates all the comments I downloaded then adds the new record. How to I get it to Add new rows and update existing rows? Really appreciate all you do to teach us about PowerApps.

stuartfrench