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!
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.
Best Regards,
Levi
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
@Chrisal23 is this a sharepoint "yes/no column"? If so, use false in your trigger condition instead of "No".