# Problems with For loop!

**URL:** <https://community.thunkable.com/t/problems-with-for-loop/35118>\
**Category:** Questions about Thunkable X\
**Created:** [July 10, 2018, 1:14pm UTC](https://community.thunkable.com/t/problems-with-for-loop/35118 "2018-07-10T13:14:29Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 10, 2018, 1:42pm UTC](https://community.thunkable.com/t/problems-with-for-loop/35118/5 "2018-07-10T13:42:09Z")

</div>

The problem is that the Web\_API.Get uses slow asynchronous call. A cycle has worked, as Web\_API.Get have not had time for it and, therefore, displayed the latest reading. You will need to modify the algorithm so that the next call to Web\_API.Get happened only after the completion of the previous call.

Here it is necessary to use recursion, as Mark showed.

> [@Asynchronous Blocks within Loops](http://community.thunkable.com/t/asynchronous-blocks-within-loops/33524):
>
> We recently had a bug reported by a user who was seeing strange behaviors within the “then do” part of a RealtimeDB.Save block which was within a loop block. The strange part was that even though each execution of the RealtimeDB.Save block was called with the current value of the loop variable (or something based on the current value) the blocks within the “then do” part always just saw the last value of the loop variable! This is a well known issue when using asynchronous function blocks (lik…

I will think over such a block

---

_[View the full topic](https://community.thunkable.com/t/problems-with-for-loop/35118)._
