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

Infinite loop when i editing raw with 2 list

Hello,

My flow is running in infinite loop when i modify my List. I search everywhere and i didn't find the solution.

 

I have 2 different list (list1 and list2) which are updated between them:

 

-When i create new items in list 1, there are automatically created in my list 2. Same if i create in list 2, it's modified in list1 -> Working

 

-When i delete row in list 1 or list 2, the raw in other list are deleted -> Working

 

-When i modify data in list 1 or list 2, the data are modified but the flow are infinite running every 30s... -> not working.

I don't want to use approval flow, because a lot of data will be updated each month. One raw can be edited more than 10 times.

 

Can you help me ? I'm working in Sharepoint online

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Infinite loop when i editing raw with 2 list

Hi @hellothere this is what I was trying to describe in my earlier post.

 

This is the simplest way of determining if the Flow is triggering itself or it is firing because someone has legitimately updated the list item. This is a pattern which I use a lot and always seems to successfully stop my Flows from getting tied up in loops.

 

Scenario 1 - Matt Weston comes along and creates a new item in the list. The modified field is set to Matt Weston, therefore when the Flow runs it will understand that it needs to create/update the other list.

 

Scenario 2 - The list item has been updated by a Flow, however the connection has been established using the service account. The modified account therefore is the UPN of my service account, which means that my Flow will not perform any further updates.

 

UserCheck.PNG

 

This same check can be applied to both of your FLows, the one on List 1 and the other on List 2. Then where you are using an Update or Create action, ensure that you change the connection to the service account.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

12 REPLIES 12
Community Support Team
Community Support Team

Re: Infinite loop when i editing raw with 2 list

Hi @hellothere ,

 

I have analyzed your flow and find your flow would infinite loop since as soon as an item is updated in the list1 or list2, the other list would be updated, and the flow trigger would always be triggered.

 

I try to provide you a solution however I haven’t find an effective solution until now.

 

Please take a try to add columns in the list1 and list2,  and add a Condtion under the trigger to stop the infinite loop.

 

I would continue to search for solution and will let you know if I find it.

 

Best regards,

Mabel          

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hellothere
Level: Powered On

Re: Infinite loop when i editing raw with 2 list

Hello,

 

i have created 2 new columns:

 

When i edited my list 1 for make update list 2

- list2-edited : get "modified"

- list1-edited : nothing

 

When i edited my list 2 for make update list 1

- list2-edited : nothing

- list1-edited : get "modified"

 

When i edited my list 1 for make update list 2

If list1-edited : "modified" do nothing, else make update

 

When i edited my list 2 for make update list 1

If list2-edited : "modified" do nothing, else make update

 

There are working and allow to avoid auto triggering. But my problem, its there are working only one time, if i re-modify the raw it's not working because my condition its already wrong because the value are already on "modified"

Super User
Super User

Re: Infinite loop when i editing raw with 2 list

When I’ve encountered this in the past I’ve used another account (service account) to do my updates. I then have a condition at the start of my Flow which checks if the service account updated. If it did, then I will terminate the Flow, however if a normal user performs the update then I will process.




Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

Highlighted
hellothere
Level: Powered On

Re: Infinite loop when i editing raw with 2 list

Hello Matt,

 

I really want to avoid "manual works", i want that everything working automatically without approvment needs


@MattWeston365 wrote:
When I’ve encountered this in the past I’ve used another account (service account) to do my updates. I then have a condition at the start of my Flow which checks if the service account updated. If it did, then I will terminate the Flow, however if a normal user performs the update then I will process.

 

hellothere
Level: Powered On

Re: Infinite loop when i editing raw with 2 list

i think to another way with the lastmodification hour and date.

 

Maybe i can compare the modification date of my list 1 and list 2 and if they are equal to do nothing, else to make the update ?

 

But it's seem that when i use "modified" the data returned is not date and hour like the sharepoint but my names etc....

Super User
Super User

Re: Infinite loop when i editing raw with 2 list

Hi @hellothere how is your Flow actually triggered at the moment? Is there another process creating entries or updating entries in the list or is that done by another process?





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

hellothere
Level: Powered On

Re: Infinite loop when i editing raw with 2 list

Capture.PNG

 

If No make update for each, if yes do nothing

hellothere
Level: Powered On

Re: Infinite loop when i editing raw with 2 list

i tried to make condition with

if name(list1) value  = name(list2) value

if XXX(list1) value  = XXX(list2) value

if X(list1) value  = X(list2) value

update else nothing.

 

But i have lot of column (80) to include in the if and to compare the lists...

there is a feature that compares the data of the modified line with the line of the other list ? and if same value do nothing else do update ?

hellothere
Level: Powered On

Re: Infinite loop when i editing raw with 2 list

still stuck in loop .....Captureloop.PNG

Super User
Super User

Re: Infinite loop when i editing raw with 2 list

Hi @hellothere this is what I was trying to describe in my earlier post.

 

This is the simplest way of determining if the Flow is triggering itself or it is firing because someone has legitimately updated the list item. This is a pattern which I use a lot and always seems to successfully stop my Flows from getting tied up in loops.

 

Scenario 1 - Matt Weston comes along and creates a new item in the list. The modified field is set to Matt Weston, therefore when the Flow runs it will understand that it needs to create/update the other list.

 

Scenario 2 - The list item has been updated by a Flow, however the connection has been established using the service account. The modified account therefore is the UPN of my service account, which means that my Flow will not perform any further updates.

 

UserCheck.PNG

 

This same check can be applied to both of your FLows, the one on List 1 and the other on List 2. Then where you are using an Update or Create action, ensure that you change the connection to the service account.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

hellothere
Level: Powered On

Re: Infinite loop when i editing raw with 2 list

Hi @MattWeston365 ,

 

It's possible to make the service SharePoint e-mail in the IF ?

Because we are at least 100 people to work in the SharePoint and to modify data.

 

Or if i understand i must make my e-mail because i have created the flow ? so other can update without loop, but if i want to update i can't ?

 

Thank you for your help

hellothere
Level: Powered On

Re: Infinite loop when i editing raw with 2 list

ok it seems working, i used modified by e-mail

 

Thanks

Helpful resources

Announcements
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 Kudoed Authors (Last 30 Days)
Users online (5,141)