Skip to main content

Notifications

Power Automate - General Discussion
Answered

Attempting to Stop Infinite Flow

(0) ShareShare
ReportReport
Posted on by 8

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!

  • Verified answer
    v-liwei-msft Profile Picture
    v-liwei-msft on at
    Re: Attempting to Stop Infinite Flow

    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

  • Kaif_Siddique Profile Picture
    Kaif_Siddique 2,099 on at
    Re: Attempting to Stop Infinite Flow

    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

  • PowerRanger Profile Picture
    PowerRanger 3,458 on at
    Re: Attempting to Stop Infinite Flow

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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard