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

Sync data between 2 Sharepoint lists - Inifinite loop

Hello,

 

I currently have 2 simple SharePoint lists,

 

List A: Users can create and modify their records at any time.

List B: Data replicated from ListA, used by admin to review and approve requests. 

 

For example lets say I have 2 columns on each of these lists. One name (text field) and another called Flow (yes or no).

 

I currently have 2 microsoft flows for each of my lists wihch are setup identical:

1) On item create or modify

2) Check to see if my Flow column is set to yes or no

   - If yes, then update item to reset value to no (Inifinte loop here)

   - If no, then Get item for 2nd list (filtered data)

       A) Is there no match from the Get item filter, yes or no? 

( equals(length(body('Get_items_2')?['value']), 0) )

            - If yes, then create new item on 2nd list. (inifinite loop here)

                a) I force the Flow column to Yes here.

            !- If no, then update item from 2nd list. (inifinite loop here)

                a) I force the Flow column to Yes here.

 

I really need these 2 lists to be synced up at all times, for example of something iscreated or modified on list B, it should reflect on list A. If something is updated or created on list A, it should reflect on list B.

 

Any insight on how to stop the inifinite loop?

1 REPLY 1
v-lin-msft
Level 10

Re: Sync data between 2 Sharepoint lists - Inifinite loop

Hi @Owizardo,

 

According to your requirement description of Flow, I created a Flow to achieve what you need is that 2 lists to be synced up at all times, the screenshot as below:

Annotation 2019-05-08 163826.png

 

When an item is created in list1, first judge whether the file added or modified exists in list2.

-If No, create item in list2.

-If Yes, judge whether it is a modified state:

If 'flow' is 'Yes', do nothing;

If 'flow' is 'No', update item in list 2.

You can create the other flow from this flow, but swap the elements in list 1 with list2.

 

And every time you change an item in the list, you have to set 'flow' state as 'No'.

 

If you still have the problem, please show us screenshots so we can help you find the source of the problem.

 

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

Microsoft Flow Online Conference

Join us for a FULL day of FREE Microsoft Flow Sessions from some of the best minds in the industry!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 182 members 5,265 guests
Please welcome our newest community members: