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

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?

5 REPLIES 5
v-xida-msft
Community Support
Community Support

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.
pradeep_khanna
Frequent Visitor

@the_joey_o , I am sorry if my answer is too naive, but unless there is a desperate Need to keep the two lists Synchronous in Real-Time, you can think of a time-based trigger: run the task every day or twice a day or so on (you can choose the periodicity). Compare each item on modified date, and whichever one has a more recent update date-time stamp, feed that into the other list. Alternately (Slower performance, and depending on number of columns in metadata), you compare field-on-field, using "Get Changes of an Item or a File (properties only)". This should work for most cases, unless you have two lists popular enough to have Many-many changes every minute.

 
Anonymous
Not applicable

@pradeep_khanna What you have outlined is what I thought would be a far simpler approach. I just haven't quite figured out how to do it and haven't found any resources guiding how to do it. You are the first person that has put this approach forward that I have been able to find :).

I have an active real-time update for the master list to child list, but there is a requirement from users to be able to update the child list and have it flow back to the master. The once/twice per-day compare each item on modify date/time stamp is what I would like to implement. Do you have any links to any resources that explain how to do that? 

Here's what I'd do:

  1. On both lists that need to be in Synch, introduce a date-time column "Last Synched"
  2. Create a flow that will run hourly (Or whatever frequency works best for you to balance business requirement & resource efficiency)
    pradeep_khanna_1-1691130107959.png
  3. Two Methods from here on...
    1. Get All Changes:
      1. Read list items where Last Synched < Modified date
      2. Move all column values from all common columns from one list to the other
    2. Update ONLY IF some specific columns have been changed:
      1. Use the "Get Changes" template:
        pradeep_khanna_0-1691129797942.png
      2. Loop on the fields of the list, pick up the deltas, update them across the lists
  4. Before you exit the workflow, update the "Last Synched" field

PS: If there is simply a parent-child relationship where you are trying to inherit data from the parent to the child list, you may want to explore a simple "Lookup Column" before you get into this complexity

Anonymous
Not applicable

Hey thanks Pradeep. I'll give it a go and see if I can get it to work.

 

I've used lookups extensively between different lists and it is very handy functionality.

 

My Parent/child description was probably a bit wrong there. There are 2 lists (lets call the List A and List B) that feed values into a 3rd List C (which also has direct inputs), but a full sync back from List C to list A when List A values are changed, and the same for List B values in List C that have been edited, writing back into List B.

 

Thanks again for the response, much appreciated.

Helpful resources

Announcements

Calling all User Group Leaders and Super Users! Mark Your Calendars for the next Community Ambassador Call on May 9th!

This month's Community Ambassador call is on May 9th at 9a & 3p PDT. Please keep an eye out in your private messages and Teams channels for your invitation. There are lots of exciting updates coming to the Community, and we have some exclusive opportunities to share with you! As always, we'll also review regular updates for User Groups, Super Users, and share general information about what's going on in the Community.     Be sure to register & we hope to see all of you there!

April 2024 Community Newsletter

We're pleased to share the April Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.    COMMUNITY HIGHLIGHTS   Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzDeenujialexander2523ragavanrajanLaurensMManishSolankiMattJimisonLucas001AmikcapuanodanilostephenrobertOliverRodriguestimlAndrewJManikandanSFubarmmbr1606VishnuReddy1997theMacResolutionsVishalJhaveriVictorIvanidzejsrandhawahagrua33ikExpiscornovusFGuerrero1PowerAddictgulshankhuranaANBExpiscornovusprathyooSpongYeNived_Nambiardeeksha15795apangelesGochixgrantjenkinsvasu24Mfon   LATEST NEWS   Business Applications Launch Event - On Demand In case you missed the Business Applications Launch Event, you can now catch up on all the announcements and watch the entire event on-demand inside Charles Lamanna's latest cloud blog.   This is your one stop shop for all the latest Copilot features across Power Platform and #Dynamics365, including first-hand looks at how companies such as Lenovo, Sonepar, Ford Motor Company, Omnicom and more are using these new capabilities in transformative ways. Click the image below to watch today!   Power Platform Community Conference 2024 is here! It's time to look forward to the next installment of the Power Platform Community Conference, which takes place this year on 18-20th September 2024 at the MGM Grand in Las Vegas!   Come and be inspired by Microsoft senior thought leaders and the engineers behind the #PowerPlatform, with Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab and Leon Welicki already confirmed to speak. You'll also be able to learn from industry experts and Microsoft MVPs who are dedicated to bridging the gap between humanity and technology. These include the likes of Lisa Crosbie, Victor Dantas, Kristine Kolodziejski, David Yack, Daniel Christian, Miguel Félix, and Mats Necker, with many more to be announced over the coming weeks.   Click here to watch our brand-new sizzle reel for #PPCC24 or click the image below to find out more about registration. See you in Vegas!       Power Up Program Announces New Video-Based Learning Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram. These include a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the image below to find out more!   UPCOMING EVENTS Microsoft Build - Seattle and Online - 21-23rd May 2024 Taking place on 21-23rd May 2024 both online and in Seattle, this is the perfect event to learn more about low code development, creating copilots, cloud platforms, and so much more to help you unleash the power of AI.   There's a serious wealth of talent speaking across the three days, including the likes of Satya Nadella, Amanda K. Silver, Scott Guthrie, Sarah Bird, Charles Lamanna, Miti J., Kevin Scott, Asha Sharma, Rajesh Jha, Arun Ulag, Clay Wesener, and many more.   And don't worry if you can't make it to Seattle, the event will be online and totally free to join. Click the image below to register for #MSBuild today!   European Collab Summit - Germany - 14-16th May 2024 The clock is counting down to the amazing European Collaboration Summit, which takes place in Germany May 14-16, 2024. #CollabSummit2024 is designed to provide cutting-edge insights and best practices into Power Platform, Microsoft 365, Teams, Viva, and so much more. There's a whole host of experts speakers across the three-day event, including the likes of Vesa Juvonen, Laurie Pottmeyer, Dan Holme, Mark Kashman, Dona Sarkar, Gavin Barron, Emily Mancini, Martina Grom, Ahmad Najjar, Liz Sundet, Nikki Chapple, Sara Fennah, Seb Matthews, Tobias Martin, Zoe Wilson, Fabian Williams, and many more.   Click the image below to find out more about #ECS2024 and register today!     Microsoft 365 & Power Platform Conference - Seattle - 3-7th June If you're looking to turbo boost your Power Platform skills this year, why not take a look at everything TechCon365 has to offer at the Seattle Convention Center on June 3-7, 2024.   This amazing 3-day conference (with 2 optional days of workshops) offers over 130 sessions across multiple tracks, alongside 25 workshops presented by Power Platform, Microsoft 365, Microsoft Teams, Viva, Azure, Copilot and AI experts. There's a great array of speakers, including the likes of Nirav Shah, Naomi Moneypenny, Jason Himmelstein, Heather Cook, Karuana Gatimu, Mark Kashman, Michelle Gilbert, Taiki Y., Kristi K., Nate Chamberlain, Julie Koesmarno, Daniel Glenn, Sarah Haase, Marc Windle, Amit Vasu, Joanne C Klein, Agnes Molnar, and many more.   Click the image below for more #Techcon365 intel and register today!     For more events, click the image below to visit the Microsoft Community Days website.      

Tuesday Tip | Update Your Community Profile Today!

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   We're excited to announce that updating your community profile has never been easier! Keeping your profile up to date is essential for staying connected and engaged with the community.   Check out the following Support Articles with these topics: Accessing Your Community ProfileRetrieving Your Profile URLUpdating Your Community Profile Time ZoneChanging Your Community Profile Picture (Avatar)Setting Your Date Display Preferences Click on your community link for more information: Power Apps, Power Automate, Power Pages, Copilot Studio   Thank you for being an active part of our community. Your contributions make a difference! Best Regards, The Community Management Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Super User of the Month | Ahmed Salih

We're thrilled to announce that Ahmed Salih is our Super User of the Month for April 2024. Ahmed has been one of our most active Super Users this year--in fact, he kicked off the year in our Community with this great video reminder of why being a Super User has been so important to him!   Ahmed is the Senior Power Platform Architect at Saint Jude's Children's Research Hospital in Memphis. He's been a Super User for two seasons and is also a Microsoft MVP! He's celebrating his 3rd year being active in the Community--and he's received more than 500 kudos while authoring nearly 300 solutions. Ahmed's contributions to the Super User in Training program has been invaluable, with his most recent session with SUIT highlighting an incredible amount of best practices and tips that have helped him achieve his success.   Ahmed's infectious enthusiasm and boundless energy are a key reason why so many Community members appreciate how he brings his personality--and expertise--to every interaction. With all the solutions he provides, his willingness to help the Community learn more about Power Platform, and his sheer joy in life, we are pleased to celebrate Ahmed and all his contributions! You can find him in the Community and on LinkedIn. Congratulations, Ahmed--thank you for being a SUPER user!

Tuesday Tip: Getting Started with Private Messages & Macros

Welcome to TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   This Week's Tip: Private Messaging & Macros in Power Apps Community   Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member!   Our Knowledge Base article about private messaging and macros is the best place to find out more. Check it out today and discover some key tips and tricks when it comes to messages and macros:   Private Messaging: Learn how to enable private messages in your community profile and ensure you’re connected with other community membersMacros Explained: Discover the convenience of macros—prewritten text snippets that save time when posting in forums or sending private messagesCreating Macros: Follow simple steps to create your own macros for efficient communication within the Power Apps CommunityUsage Guide: Understand how to apply macros in posts and private messages, enhancing your interaction with the Community For detailed instructions and more information, visit the full page in your community today:Power Apps: Enabling Private Messaging & How to Use Macros (Power Apps)Power Automate: Enabling Private Messaging & How to Use Macros (Power Automate)  Copilot Studio: Enabling Private Messaging &How to Use Macros (Copilot Studio) Power Pages: Enabling Private Messaging & How to Use Macros (Power Pages)

Users online (5,641)