cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
admiralman
Helper I
Helper I

Flow to populate SP List

I have a SP List called Employees that contains information about Employees such as hire date and birth day. This list is used by a couple of web parts to show Anniversaries and Birthdays for the month. I have a flow that runs on a daily basis that pulls an email attachment and populates the list. The Flow deletes all records from the list and adds new records from the email attachment. This works perfectly except it takes about 10 minutes to complete. During this time if someone accesses the page with the web part they will get incomplete data as the list could be in the process of being populated. Unfortunately I cannot schedule the email delivery to the middle of the night so this could be a problem. I am looking for a solution that keeps the list whole at all times. Are there any recommendations out there for achieving this? Thank you. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @admiralman ,

 

You can provide details of the flow configuration so that we can provide suggestions for optimizing the current flow.

 

In addition, if Apply to each is used in your Flow, you can do the following settings:

12.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Brad_Groux
Community Champion
Community Champion

The length of time it takes is likely due to using a for each loop within the Flow, which takes time for each line within the list. If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

v-bacao-msft
Community Support
Community Support

 

Hi @admiralman ,

 

You can provide details of the flow configuration so that we can provide suggestions for optimizing the current flow.

 

In addition, if Apply to each is used in your Flow, you can do the following settings:

12.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@v-bacao-msft Thanks for the tip on the Concurrency. I have two Apply to Each loops. I first connect to the SP list and get all of the records then use an Apply to Each to use the received ID of the record to delete it. I enabled Concurrency and set it to 50 and it did speed it up. There was odd behavior as it appeared to adhere to the Concurrency setting for the first 200 of 275 records then seemed to slow down significantly. The second step in the process is to connect to an Excel document and get new records (276) and use an Apply to Each to add each record into SP. I also changed the Concurrency and set it to 50. Seems to me that there is some throttling going on. I am on an Office 365 Flow License (Flow Free) but my user is currently under a Premium Trial (even though it is not shown in the Admin Portal). From start to finish the flow takes about 10 mins which is the same time it was prior to adding the concurrency setting. I was hoping for some kind to way to insert records into a temporary list, delete the primary list, and rename the temporary to the name of the primary. Thanks

 

 

Flow.PNG

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors
Users online (3,146)