# Delaying a GET call to Firebase until the previous call has completed

**URL:** https://community.thunkable.com/t/delaying-a-get-call-to-firebase-until-the-previous-call-has-completed/68995
**Category:** Questions about Thunkable X
**Created:** [February 15, 2019, 10:42am UTC](https://community.thunkable.com/t/delaying-a-get-call-to-firebase-until-the-previous-call-has-completed/68995 "2019-02-15T10:42:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![NoviceUser](https://avatars.discourse-cdn.com/v4/letter/n/8797f3/32.png) [@NoviceUser](https://community.thunkable.com/u/NoviceUser)
#### Post date: [February 15, 2019, 10:42am UTC](https://community.thunkable.com/t/delaying-a-get-call-to-firebase-until-the-previous-call-has-completed/68995/1 "2019-02-15T10:42:49Z")

</div>

Is there any way to ensure that data has been returned (or an error generated because there is no data to get) before progressing to the next line of code inside a Count from 1 to x loop?

I thought that the ‘when Get is done’ would cope with it, but in the code that I have written I get missing data nine times out of ten even when I use a Wait block. I’m not sure if this is the best way to show the code:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/e/5ef81e971f6dc7a66c2a868e8f445aaa9fb85866.png)

My loop is normally between 7 and 9 iterations and including the Wait command I get a 75% success rate; without it I get a 5% success rate for all of the data. I can improve the success rate by extending the delay, but ideally I don’t want to build in a long wait to retrieve everything.

Any help much appreciated!

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [August 11, 2020, 10:38pm UTC](https://community.thunkable.com/t/delaying-a-get-call-to-firebase-until-the-previous-call-has-completed/68995/2 "2020-08-11T22:38:24Z")

</div>

A post was merged into an existing topic: [Can you help me with Firebase?](https://community.thunkable.com/t/can-you-help-me-with-firebase/42526)

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [August 11, 2020, 10:38pm UTC](https://community.thunkable.com/t/delaying-a-get-call-to-firebase-until-the-previous-call-has-completed/68995/3 "2020-08-11T22:38:24Z")

</div>


