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

Attempting to Stop Infinite Flow

Hi,

 

I've been reading up on this forum for the issue I have with a flow that loops non-stop.

 

Currently, my flow kicks off when the status in my list is flagged as "pending." However, the problem is that multiple runs occur shortly after for the same instance.

 

To stop this, I'm attempting to use the Trigger Conditions option for my "When and Item or File is Modified" trigger. I created a new column called "RunFlag" and have set the default value to No. After the trigger runs it will update this column to Yes.

 

Here's my condition: @contains(triggerBody()?['RunFlag'], 'No')

 

The problem is when I flip my status to Pending on my list it's no longer triggering. Am I missing something?

 

I'll note I've tried adding the No value manually to my column without luck. I've tried reversing the conditions and also no luck.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-liwei-msft
Community Support
Community Support

Hi @Chrisal23 ,

 

The problem may be because the item you are modifying is not the first time it has been modified. 

In the first modification, the flow is triggered and then the RunFlag is modified to Yes, so when you modify this column later, the flow is no longer triggered because the TriggerCondition is not satisfied. 

You can use the method without adding TriggerCondition: 

1. Add Get changes for an item or a file (properties only). 

2. Add Condition to determine whether RunFlag has been changed during this modification. 

3. If the result is equal to false, continue your process. If the result is equal to true, the stream is terminated.

vliweimsft_0-1662368363315.png

vliweimsft_1-1662368375037.png

vliweimsft_2-1662368389731.png

 

 

Best Regards,

Levi

View solution in original post

3 REPLIES 3
PowerRanger
Super User
Super User

@Chrisal23 is this a sharepoint "yes/no column"? If so, use false in your trigger condition instead of "No".

 




​Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

If the content was useful in other ways, please consider giving it Thumbs Up.
Kaif_Siddique
Impactful Individual
Impactful Individual

Stopping Infinite Loops When Updating SharePoint List Items - Step by step procedure

https://o365scott.blog/2019/12/18/stopping-infinite-loops-when-updating-sharepoint-list-items/

 

Hope this will hep you.

 

If you like my response, please give it a Thumbs Up.
If this helps, please Accept as solution.

 

Regards
Kaif

v-liwei-msft
Community Support
Community Support

Hi @Chrisal23 ,

 

The problem may be because the item you are modifying is not the first time it has been modified. 

In the first modification, the flow is triggered and then the RunFlag is modified to Yes, so when you modify this column later, the flow is no longer triggered because the TriggerCondition is not satisfied. 

You can use the method without adding TriggerCondition: 

1. Add Get changes for an item or a file (properties only). 

2. Add Condition to determine whether RunFlag has been changed during this modification. 

3. If the result is equal to false, continue your process. If the result is equal to true, the stream is terminated.

vliweimsft_0-1662368363315.png

vliweimsft_1-1662368375037.png

vliweimsft_2-1662368389731.png

 

 

Best Regards,

Levi

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,424)