# List of info from RealTime DB only populating on second click

**URL:** <https://community.thunkable.com/t/list-of-info-from-realtime-db-only-populating-on-second-click/980674>\
**Category:** Questions about Thunkable X\
**Tags:** firebase, lists, list, push-notifications, realtimedb\
**Created:** [November 17, 2020, 5:48pm UTC](https://community.thunkable.com/t/list-of-info-from-realtime-db-only-populating-on-second-click/980674 "2020-11-17T17:48:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [November 17, 2020, 6:03pm UTC](https://community.thunkable.com/t/list-of-info-from-realtime-db-only-populating-on-second-click/980674/2 "2020-11-17T18:03:17Z")

</div>

You are not alone!

The firebase GET and SAVE blocks are asynchronous (as evidenced by the THEN DO section). When you put them in a loop or execute one after the other, erratic behavior is the norm. I have found 2 solutions to the problem.

> [@Replace GET or SAVE Blocks with cloud variables](http://community.thunkable.com/t/thunkable-hack-deep-firebase-json-data-manipulation-without-using-get-or-save-blocks/975738):
>
> I just discovered a VERY simple and fast way to get and set Firebase data without using the GET or SAVE blocks (which has all sorts of asynchronous issues). The 2 any button click blocks below return the same data. Just put the GET block KEY variable into the CLOUD variable name and PRESTO. You have a synchronous call to firebase! Similarly, you can set data anywhere in the JSON Hierarchy using cloud variables. Both of the examples below update Firebase, but the CLOUD based solution…

> [@Wrapping Asynchronous (then do) blocks into a Synchronous Function resolves unpredictable results](http://community.thunkable.com/t/wrapping-asynchronous-then-do-blocks-into-a-synchronous-function-resolves-unpredictable-results/910511):
>
> Thunkable provides an extensive library of calls to external services including Google Docs and Web APIs. These external calls are, by necessity, asynchronous calls. That is, the request is sent to the external serivce, Thunkable block execution continues on it’s merry way, then the external service sends a reply. Thunkable wraps the external calls in in blocks with “Then Do” sections. This is a massive improvement over separate call and response block (MIT App Inventor), but it is not without …

---

_[View the full topic](https://community.thunkable.com/t/list-of-info-from-realtime-db-only-populating-on-second-click/980674)._
