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

"When an item is created or modified" Sharepoint trigger causes endless loop

With the created or modified sharepoint trigger, if the flow updates an item within the list that the trigger activates on, it will trigger the flow over again. This results in an endless loop of triggers. I can see where this may be useful, but in many cases, mine included, this breaks the entire process and makes the flow I've been working on completely useless.

2 REPLIES 2
nkreider
Level: Powered On

Re: "When an item is created or modified" Sharepoint trigger causes endless loop

Wrote this up quick earlier as I was heading into a meeting, so didn't get to add much detail.

 

I ran a test to confirm my suspicions and here are the results.

 

I added an "Edited" Yes/No column to my list. To ensure this flag is only set to true when an actual person creates or edits and item, the flag is set to true. At the end of the flow when I edit that same item as I need to, I set the flag to false. At the top of the flow I check whether this flag is true. If it is, I continue with the flow as intended. If not, the flow ends.

I proceded to edit and item and it ran exactly as it was supposed to. Also as expected there came a second run shortly after.

Just to be sure these were the same item I went into each to verify. Below are a couple clips of the intended run. Item ID is 49 and since the flag I created was true, the flow ran as it should.

Now, here are the same clips of the follow-up run. Notice the same item ID, and the flag is now false.

Highlighted
GordonB
Level: Powered On

Re: "When an item is created or modified" Sharepoint trigger causes endless loop

I would like to add that I think this is a bug in Flow.  Sure it is possible to have a flag with a ton of logic to determine if the record needs to be updated, but that is a lot of overhead of the developer.  This wasn't an issue with Sharepoint workflows.

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!

Users Online
Currently online: 201 members 6,375 guests
Please welcome our newest community members: