# How do I write a Do ... Until loop with exit condition

**URL:** <https://community.make.com/t/how-do-i-write-a-do-until-loop-with-exit-condition/37869>\
**Category:** Questions\
**Tags:** functions\
**Created:** [May 17, 2024, 8:57pm UTC](https://community.make.com/t/how-do-i-write-a-do-until-loop-with-exit-condition/37869 "2024-05-17T20:57:28Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![alex.newpath](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/alex.newpath/32/84_2.png) [@alex.newpath](https://community.make.com/u/alex.newpath)\
**Post date:** [May 18, 2024, 2:49pm UTC](https://community.make.com/t/how-do-i-write-a-do-until-loop-with-exit-condition/37869/6 "2024-05-18T14:49:42Z")

</div>

This response could be of interest it uses the error handler and a repeater

> [@Why is Polling at make.com is so damn hard?](https://community.make.com/t/why-is-polling-at-make-com-is-so-damn-hard/33669/4):
>
> Something like this perhaps, you throw an error to break out of the check loop if there is a successful state. Throw error by using null in a required field. [Screenshot\_2024-04-14\_000448] This is where the commit directive comes in useful.

---

_[View the full topic](https://community.make.com/t/how-do-i-write-a-do-until-loop-with-exit-condition/37869)._
