cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gcrevsw
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
v-bacao-msft
Community Support
Community Support

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.
Anonymous
Not applicable

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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,193)