web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Do Until Loop Finishin...
Power Automate
Answered

Do Until Loop Finishing Early Despite not meeting condition

(0) ShareShare
ReportReport
Posted on by 5

Hello,

 

I have a Do Until loop that quits when a counter is >= to the length of an array I am iterating. In the Do Until loop, I send an approval and wait for the response before moving to the next item in the array to send the approval. After this approval, I increment my counter by 1 (it starts at 0). The entire flow is completing a task that sends out a queue of approvals, and if someone rejects an approval it goes back to the original bucket. So, if someone rejects an approval, I want to quit the loop, I set the counter variable to be equal to the length of the array + 1, to break the loop. However, I have noticed the loop is quitting despite no rejections. I have tried messing with the timeout and count of the do until loop, but I am not sure I understand. It has done this running for 6 hours - 5 days. Would anyone be able to help solve this? 

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,957 Super User 2026 Season 1 on at

    Hi @cm123 ,

     

    Check and change the default limits for the Do Until Loop:

     

    Snag_c72098c.png

     

    The loop is set to run until your condition is met or for 60 counts or until one hour has passed, whichever comes first. These default limits help prevent indefinite or long-running loops.

     

    Example below: P30D or 30 Days:

     

    ekarim2020_0-1706131409757.png


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

  • cm123 Profile Picture
    5 on at

    Thank you @ekarim2020  for the response. I was not running into this problem previously with the default settings. So, you are saying that the loop will terminate if it has iterated 60 times, it has iterated for over an hour, or if it meets the condition (this one I know)?

    I currently have the timeout set to P30D and 5000 count to avoid this problem, I have not ran it since changing but I will try to see if this helps! Thank you!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard