cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mtagliaferri
Resolver I
Resolver I

Flow Keeps Triggering in a Loop

I have List A with a flow 'When an item or file is modified' which has a condition when a specific Check Box is ticked it will update a specific item in a different List B.

This works perfectly once the Check Box is ticked it updates the specific item in List B as once the item has been updated the flow stops running.

I have updated the flow as I now need also to update an item in the same List A via the flow, I updated the flow with Update Item 2 as per pic. Since I updated the flow it now goes round on a constant loop.Capture1.JPG

 

Capture2.JPG

 

1 ACCEPTED SOLUTION

Accepted Solutions

I suspect what you are running into is that if a particular field doesn't have a value it is just not returned by the connector.  null is equal to true will cause an error, but true is equal to null will just evaluate as false.  It is a bit counterintuitive but that's the way it works.  In the first condition that field will always have a value based on whether the field changed or not.  But I suspect your second one is evaluating against a column in the data.  That is where you can run into trouble if the value isn't defined.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

7 REPLIES 7
Pstork1
Dual Super User
Dual Super User

The problem is that updating List A later in the flow automatically re-triggers the flow.  When using the When a File or Item is Modified trigger there is an action you can use to check what field was modified.  Use that action just after the trigger to see if only the field you are updating in the flow was modified.  If that is the only change then terminate the flow.

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thanks, but I am even more confused.

What further action do I need to take when inserting the step you have mentioned?

The second action in my screenshot will return dynamic content showing whether a specific field was updated or not.  Assuming the fields you are updating in the flow are only every updated in the flow, never by a user directly, then add a condition just below the end of my screenshot to check if that column was changed in this trigger.  If it was exit the flow with Terminate Successful, else continue with your regular logic.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

You mentioned that under the assumption the field Status is only updated by the flow and never by the user I am not able to distinguish the difference in the condition by user / flow.

I have updated the flow to what I understand you meant, by placing a condition on the Status, but now the flow never triggers.

Capture3.png

 

Pic2.JPG

 

Capture4.JPG

 

Checking whether any column has changed shouldn't keep the flow from triggering.  It should just keep the flow from progressing after triggering based on a status change.  Is it not triggering at all?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Apologies I should have wrote 'the flow never progresses'.

I realised I have entered the wrong condition so now it appears to be working, I have included the flow however I am puzzled of why on on condition I had to place the condition True is equals to dynamic content to make this work opposed to condition 2 where I placed Dynamic content equals to true.

Any explanation on this?Capture1.png

 

I suspect what you are running into is that if a particular field doesn't have a value it is just not returned by the connector.  null is equal to true will cause an error, but true is equal to null will just evaluate as false.  It is a bit counterintuitive but that's the way it works.  In the first condition that field will always have a value based on whether the field changed or not.  But I suspect your second one is evaluating against a column in the data.  That is where you can run into trouble if the value isn't defined.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,614)