# New: Wait For Condtion

**URL:** <https://community.glideapps.com/t/new-wait-for-condtion/58719>\
**Category:** Ask for Help\
**Created:** [March 3, 2023, 10:12am UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719 "2023-03-03T10:12:48Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yasin\_Hassanien](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yasin_hassanien/32/9042_2.png) [@Yasin\_Hassanien](https://community.glideapps.com/u/Yasin_Hassanien)\
**Post date:** [March 3, 2023, 10:12am UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/1 "2023-03-03T10:12:48Z")

</div>

Wait for condition action

Anyone can can explain use cases?

---

<div class="post-metadata">

**Author:** ![slscustom.ru](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/slscustom.ru/32/77336_2.png) [@slscustom.ru](https://community.glideapps.com/u/slscustom.ru)\
**Post date:** [March 3, 2023, 10:41am UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/2 "2023-03-03T10:41:54Z")

</div>

I tried and it stops running actions sequence(in custom actions) until described seconds.  
No?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 3, 2023, 10:57am UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/3 "2023-03-03T10:57:44Z")

</div>

A common use case would be when you have an action that will produce a value, and you want to use that value in another action in the same sequence. Inserting the wait for condition action in between allows time for the first action to complete, so the second action has the value it needs.

In a case like this, the target column might start off empty, and so the wait for condition would be “until column is not empty”.

---

<div class="post-metadata">

**Author:** ![Yasin\_Hassanien](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yasin_hassanien/32/9042_2.png) [@Yasin\_Hassanien](https://community.glideapps.com/u/Yasin_Hassanien)\
**Post date:** [March 3, 2023, 11:13am UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/4 "2023-03-03T11:13:41Z")

</div>

I like the reuse value

---

<div class="post-metadata">

**Author:** ![slscustom.ru](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/slscustom.ru/32/77336_2.png) [@slscustom.ru](https://community.glideapps.com/u/slscustom.ru)\
**Post date:** [March 4, 2023, 12:12am UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/5 "2023-03-04T00:12:55Z")

</div>

And of course, already we have another action is wait with condition which we can use as Darren write above.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [March 4, 2023, 12:37am UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/6 "2023-03-04T00:37:46Z")

</div>

Wait will just purely wait like sleep(), wait for condition is more advanced. But if you need to display a nice loading message and don’t need to actually check against conditions then wait will do.

---

<div class="post-metadata">

**Author:** ![Jonathon\_Kohn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jonathon_kohn/32/8593_2.png) [@Jonathon\_Kohn](https://community.glideapps.com/u/Jonathon_Kohn)\
**Post date:** [March 4, 2023, 6:49pm UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/7 "2023-03-04T18:49:25Z")

</div>

How about creating limited time codes that auto delete if not used 😉

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 4, 2023, 6:56pm UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/8 "2023-03-04T18:56:57Z")

</div>

Good idea….not sure it’s possible with the wait for condition because of the condition isn’t met then the rest of the action sequence halts.

What you could do is have a message appears that says tap for code, which generates a new code and opens up a new screen with the code. But if the button is never pressed, then the code is never generated and simply times out.

If ever, Glide has branching logic, then this will be possible.

---

<div class="post-metadata">

**Author:** ![Jonathon\_Kohn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jonathon_kohn/32/8593_2.png) [@Jonathon\_Kohn](https://community.glideapps.com/u/Jonathon_Kohn)\
**Post date:** [March 4, 2023, 7:39pm UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/9 "2023-03-04T19:39:07Z")

</div>

Couldn’t you “wait“ for 24 hours before deleting a row IF a relation is empty?

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 4, 2023, 7:55pm UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/10 "2023-03-04T19:55:56Z")

</div>

Oh I see.

1. Create code (new row)
2. Display code
3. If user uses code —\> delete row
4. Wait (not wait for condition)
5. Delete row

This? The real test would be if the action remembers to delete it. If the wait is some thing really lengthy, and the user has already navigated away from the app or even closed it.

---

<div class="post-metadata">

**Author:** ![Jonathon\_Kohn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jonathon_kohn/32/8593_2.png) [@Jonathon\_Kohn](https://community.glideapps.com/u/Jonathon_Kohn)\
**Post date:** [March 4, 2023, 7:56pm UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/11 "2023-03-04T19:56:21Z")

</div>

Trying to grasp the best uses for this new action… and it seems like the perfect action to use in your membership app example where it forces the user to wait until the membership relation is made before they can progress…

---

<div class="post-metadata">

**Author:** ![Jonathon\_Kohn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jonathon_kohn/32/8593_2.png) [@Jonathon\_Kohn](https://community.glideapps.com/u/Jonathon_Kohn)\
**Post date:** [March 4, 2023, 7:56pm UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/12 "2023-03-04T19:56:32Z")

</div>

Exactly

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [March 5, 2023, 12:06am UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/13 "2023-03-05T00:06:09Z")

</div>

Has Mark said anything about how long that action can wait though? 24 hours is a lot.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [March 5, 2023, 12:45pm UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/14 "2023-03-05T12:45:13Z")

</div>

The waiting does not persist in the background. If the user closes the app then the action stops running.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 5, 2023, 1:25pm UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/15 "2023-03-05T13:25:26Z")

</div>

@Mark What if they switch tabs or navigate away from the screen?

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [March 5, 2023, 10:31pm UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/16 "2023-03-05T22:31:02Z")

</div>

The action keeps running in that case.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [March 5, 2023, 10:52pm UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/17 "2023-03-05T22:52:58Z")

</div>

Nice!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [March 7, 2023, 2:41am UTC](https://community.glideapps.com/t/new-wait-for-condtion/58719/18 "2023-03-07T02:41:38Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
