cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Update Item Infinite Loop

 

Hi,

 

I have a flow on a Sharepoint list. The trigger is: "When an item is created or modified"

The flow then updates a field depending on the value of another field using the  "Update Item" action.

 

The problem is the "update item" action in itself triggers the flow again, resulting in an infinite loop.

 

Can't see an obvious way to prevent. Thought of the idea of creating a boolean for each record as a semaphore to prevent an update if the field is set to true. Must be an easier way though.

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Update Item Infinite Loop

Yes, if the list configured within trigger and Update item action is the same, it will fall into a loop.

 

The method you could consider is basically the same as you described, adding extra fields to determine if it is the expected value.

If not, then even if Flow has been triggered, Update item action will no longer be executed and the loop will be terminated.

Please refer to the methods mentioned in these links to configure Flow, hope to help you improve the current situation:

https://flow.microsoft.com/en-us/blog/advanced-flow-of-the-week-when-a-new-item-is-created-automatic...

https://medium.com/@krishnangshu.banerjee/https-indianjackofalltrade-com-how-to-stop-infinite-loop-o...

 

In addition, user have already made feedback on this issue and got the attention of PG. Please consider voting for this idea:

https://powerusers.microsoft.com/t5/Flow-Ideas/Disable-Event-Firing-when-Flow-updates-a-SharePoint-l...

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Regular Visitor

Re: Update Item Infinite Loop

Hi, I've just posted a comment about this here: https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Disable-Event-Firing-when-Flow-updates-a-Sh...

 

TLDR; Write Trigger Conditions for the ''When an item is created or modified'' and add these blockers with ''Update Item''. You can create hidden colums for the list if you need more blocker data.

 

Late reply but I found this before when browsing about the same problem, so I figured I'll spread my solution.

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Top Solution Authors
Top Kudoed Authors
Users online (6,339)