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_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,019)