cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zyraglee
Frequent Visitor

Infinite loop when an item is updated

 

 Hello,

 

I have a simple flow that checks if the billing id is empty or not after the form has been modified.

IF Empty - no action is taken

IF NOT - email is sent - update item

The item is being updated, however the email is being sent infinitely. I tried to use the Terminate control but it didnt help.

I need assistance on how to approach this please

 Thanks

 

 

Capture.JPGewq.JPG

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

Hi @zyraglee,

 

This is because the "update item" action in the flow would update the item, and as soon as the item is updated, the flow would be triggered again.

 

Please take a try to add a Yes/No type column "UpdateByFlow" in the sharepoint list.and set the defaults value of the "UpdateByFlow" to "No". Also please make sure when an item is modified manually in the sharepoint list,the "UpdateByFlow" column is setted to "No"

 

Then you could add a condition under the trigger to check if the "UpdateByFlow" column is equal to "true",if the UpdateByFlow" column is equal to "False",inside the If no branch of the condition,add a Condition to check if the billing id is empty or not.

 

And please make sure the "UpdateByFlow" column in the "Update item" action in the flow would be set to "Yes".

 

Best regards,

Alice

View solution in original post

5 REPLIES 5
v-yuazh-msft
Community Support
Community Support

Hi @zyraglee,

 

This is because the "update item" action in the flow would update the item, and as soon as the item is updated, the flow would be triggered again.

 

Please take a try to add a Yes/No type column "UpdateByFlow" in the sharepoint list.and set the defaults value of the "UpdateByFlow" to "No". Also please make sure when an item is modified manually in the sharepoint list,the "UpdateByFlow" column is setted to "No"

 

Then you could add a condition under the trigger to check if the "UpdateByFlow" column is equal to "true",if the UpdateByFlow" column is equal to "False",inside the If no branch of the condition,add a Condition to check if the billing id is empty or not.

 

And please make sure the "UpdateByFlow" column in the "Update item" action in the flow would be set to "Yes".

 

Best regards,

Alice

View solution in original post

Hi @v-yuazh-msft

I tried this as a solution and I'm still getting infinite emails

First, I created an "UpdateByFlow" column on my SharePoint list with a yes/no choice and used no as default.

 

Here's the flow:

  t1.JPGt2.JPGtrigger.JPG

 

What am I doing wrong here? Can you simulate this problem and show me a screenshot?

 

Thanks

 

This to me is a major gap that needs to be closed by Flow itself.

 

There needs to be some kind of way to update an item WITHOUT triggering a subsequent flow.  SharePoint Designer could do it.  Other products can do it.  Using "elevated" rights would do it.  

 

I have Flow after Flow that use like 6 runs when it only technically needs to do 1.  Then the users have to come up with crazy if and terminate statements to try and keep this from happening.  Where Flow is becoming a Pay-model, this is pretty ridiculous, and I'd expect the Flow limits to ultimately increase for the amount of unintended Flows that are triggered.

 

Ideally, I'm thinking some kind of trigger option (like where the new View option is) that allows you to set criteria by which the Flow should NOT trigger (e.g. if updated by this user, if this field is set, etc), and hence not count against your quota.

Any solution about this infinite loop?

Alexdcave
Frequent Visitor

@v-yuazh-msft 

 

Any solutions to this? Is the "When an item is created or modified" even usable? All of my flows are going to modify the item...

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,053)