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
Solved! Go to Solution.
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.
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.
Proud to be a Flownaut!
Community Leader: Black Country PowerApps & Flow User Group
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
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"
Proud to be a Flownaut!
Community Leader: Black Country PowerApps & Flow User Group
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.
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....
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?
Proud to be a Flownaut!
Community Leader: Black Country PowerApps & Flow User Group
If No make update for each, if yes do nothing
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 ?
still stuck in loop .....
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.
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.
Proud to be a Flownaut!
Community Leader: Black Country PowerApps & Flow User Group
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
ok it seems working, i used modified by e-mail
Thanks
User | Count |
---|---|
39 | |
38 | |
21 | |
15 | |
12 |
User | Count |
---|---|
27 | |
20 | |
19 | |
14 | |
13 |