cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

MS Flow -> FIltering an Excel Sheet to update an SP List

Hi all,

 

I am having trouble finding the most resource efficient way of implementing this flow:

 

  1. Scheduled - Every night at 11pm
  2. Delete all items in "MRP" SharePoint List
  3. Get Items from "DBS" SP List
  4. List all Items of "MRP.xlsx" in OneDrive Excel Table
  5. Apply to each: Item of the "MRP.xlsx"
    • Condition: If the "Sales Order ID" of this Item is contained somewhere within the "Sales Order ID" of the "DBS" SP List:
      • Add this item into the newly blank "MRP" SharePoint list. 

 

I was using a nested loop in order to iterate every Sales Order ID of the MRP list against every Sales Order ID of the DBS list. But this takes a very long time and I'm sure is resource heavy. What would be a better way to implement this flow?

 

Thanks,

Farhan

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: MS Flow -> FIltering an Excel Sheet to update an SP List


@farhandsome wrote:

I was using a nested loop in order to iterate every Sales Order ID of the MRP list against every Sales Order ID of the DBS list. But this takes a very long time and I'm sure is resource heavy. What would be a better way to implement this flow?


Unfortunately, the nested loop is really the only way you can accomplish this. The Excel connector has had many features deprecated over time due to performance and file locking issues. 

I have a Flow nearly identical to yours where we purge the list, then add the rows one at a time in a nested loop - and that is the only way we've been able to reliably do it.

We did decide to separate the delete/purge into a second Flow to easier track failures. We have the purge set to occur daily at 12:00AM, and the populate Flow to occur daily at 12:15AM.

It works flawlessly, but as you said it is just slow. Here's a snapshot of our Flow's main steps:

ExcelToSharePointList.png

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!

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: MS Flow -> FIltering an Excel Sheet to update an SP List


@farhandsome wrote:

I was using a nested loop in order to iterate every Sales Order ID of the MRP list against every Sales Order ID of the DBS list. But this takes a very long time and I'm sure is resource heavy. What would be a better way to implement this flow?


Unfortunately, the nested loop is really the only way you can accomplish this. The Excel connector has had many features deprecated over time due to performance and file locking issues. 

I have a Flow nearly identical to yours where we purge the list, then add the rows one at a time in a nested loop - and that is the only way we've been able to reliably do it.

We did decide to separate the delete/purge into a second Flow to easier track failures. We have the purge set to occur daily at 12:00AM, and the populate Flow to occur daily at 12:15AM.

It works flawlessly, but as you said it is just slow. Here's a snapshot of our Flow's main steps:

ExcelToSharePointList.png

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!

View solution in original post

Highlighted
Community Support
Community Support

Re: MS Flow -> FIltering an Excel Sheet to update an SP List

Hi @farhandsome,

 

Just like @Brad_Groux said, the Flow you created is the best way to achieve your goal, there was no other more flexible and ingenious approach that could do it.

 

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

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (8,094)