cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
the_joey_o
Level: Powered On

Multi-Way Sync to Multiple SharePoint Lists without Infinite Loop

I'm working with several different lists, and I'm trying to sync their content such that if an item in List A is updated, the corresponding item is updated in Lists B, C, D, and E. If an item is updated in List B, it is updated in List A, C, D, and E. If an item is updated in List C, it is updated in List A, B, D, and E. And so on. However, All of my attempts thus far have resulted in infinite loops. How would I go about achieving this?

1 REPLY 1
Community Support Team
Community Support Team

Re: Multi-Way Sync to Multiple SharePoint Lists without Infinite Loop

Hi @the_joey_o,

 

Could you please share a screenshot of your flow's configuration?

Do you create multiple separated flows on your side?

Further, do your several different lists have same data structure?

 

I suppose that you created multiple separated flows on your side based on several different SharePoint lists and you use "When an item is created or modified" trigger as the trigger of your flow. In addition, I think your several different lists have same data structure, is it true? I think the issue that you mentioned is related to your flow.

 

If the List A is updated, you use the "Update item" action to update List B, C, D and E. The "Update item" action would also trigger the flow which monitor if there is an item updated in List B, C , D and E (The List Name field set to List B, C, D and E within "When an item is created or modified" trigger).

 

If you want to avoid this infinite loops, you could consider take a try with the following workaround:

I have created a SharePoint list on my side and the data structure of it as below:2.JPGNote: The TaskName column is a Single line of text type column, Due Date column is a Date type column and the UpdateFromOtherFlow column is a Yes/No type column. The default value of UpdateFromOtherFlow column is No. The UpdateFromOtherFlow column indicated that if the modification of an item comes from other flows, please create this column on your several different SharePoint lists.

 

I have made a test on my side (make a test on two different lists) and please take a try with the following workaround:

  • Add a "When an item is created or modified" trigger, specify Site Address, List Name set to List A.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@equals(triggerBody()?['UpdateFromOtherFlow'], false)
  • Within "If/yes" branch of Condition, add a "Get items" action, specify Site Address, List Name set to List B. Add a "Filter array" action, From set to output of "Get items" action, click "Edit in advanced mode", type the following formula:
@equals(item()?['TaskName'], triggerBody()?['TaskName'])

 

     Add a "Apply to each" action, input parameter set to output of "Filter array" action. Within "Apply to each" action, add a "Update item" action, specify Site Address, List Name set to List B. Id field set to following formula:

item()?['ID']

Title field set to following formula:

item()?['Title']

TaskName field set to TaskName dynamic content of the trigger, Due Date field set to Due Date dynamic content of the trigger. The UpdateFromOtherFlow field set to Yes.

 

Image reference:3.JPG

 

4.JPG

 

The flow works successfully as below:5.JPG

 

 

Best regards,

Kris

 

 

 

Community Support Team _ Kris Dai
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 Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,575)