# Replace GET or SAVE Blocks with cloud variables

**URL:** https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738
**Category:** Questions about Thunkable X
**Tags:** firebase, solved, asynchronous, json, cloud-variable
**Created:** [November 15, 2020, 1:10pm UTC](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738 "2020-11-15T13:10:18Z")
**Posts on this page:** 10
**Page:** 2

<div class="post-metadata">

### Author: ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)
#### Post date: [March 7, 2021, 3:07am UTC](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738/22 "2021-03-07T03:07:39Z")

</div>

basically this is firebase with just one block

---

<div class="post-metadata">

### Author: ![etikawijantim](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@etikawijantim](https://community.thunkable.com/u/etikawijantim)
#### Post date: [January 25, 2022, 4:23pm UTC](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738/23 "2022-01-25T16:23:38Z")

</div>

oh i see for Get and Save, but how another option like " add listener"? and when realtime DB change block in new version?

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 25, 2022, 4:33pm UTC](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738/24 "2022-01-25T16:33:06Z")

</div>

> [@etikawijantim](#):
>
> " add listener"?

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

Once you define the key that you want to monitor then make a cloud variable for that key and then use the `initializes or changes` block to monitor changes.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [January 25, 2022, 7:32pm UTC](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738/25 "2022-01-25T19:32:29Z")

</div>

In Drag and drop, (the new version) we don’t _yett_ have listener blocks. These are coming and the more we hear from the community they are needed with examples of how your build is blocked the faster they’ll be prioritized!

---

<div class="post-metadata">

### Author: ![barnwalvivaanthunk3c](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@barnwalvivaanthunk3c](https://community.thunkable.com/u/barnwalvivaanthunk3c)
#### Post date: [January 28, 2022, 5:46am UTC](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738/26 "2022-01-28T05:46:38Z")

</div>

There is a better way to decrease code and have a synchronous call to Firebase. You can initialize a cloud variable and directly set the value to the cloud variable rather than creating two blocks of code. It also allows for advanced compatibility.

---

<div class="post-metadata">

### Author: ![etikawijantim](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@etikawijantim](https://community.thunkable.com/u/etikawijantim)
#### Post date: [February 23, 2022, 4:20am UTC](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738/27 "2022-02-23T04:20:25Z")

</div>

ok thanks

---

<div class="post-metadata">

### Author: ![etikawijantim](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@etikawijantim](https://community.thunkable.com/u/etikawijantim)
#### Post date: [February 23, 2022, 4:21am UTC](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738/28 "2022-02-23T04:21:50Z")

</div>

ok thanks sir

---

<div class="post-metadata">

### Author: ![barnwalvivaanthunk3c](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@barnwalvivaanthunk3c](https://community.thunkable.com/u/barnwalvivaanthunk3c)
#### Post date: [February 27, 2022, 8:42am UTC](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738/29 "2022-02-27T08:42:45Z")

</div>

Thanks. You can also use the Firebase’s DataChanged block and use the key as variable name and the value as the value of the variable. You can do that with the newest variable blocks. It can act as synchronous auto-updater for the keys you want.

---

<div class="post-metadata">

### Author: ![godtap](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/godtap/32/181507_2.png) [@godtap](https://community.thunkable.com/u/godtap)
#### Post date: [February 19, 2024, 12:36am UTC](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738/30 "2024-02-19T00:36:29Z")

</div>

I think that most readers of this topic overlooked the importance of your reply because I myself did just that! Was looking for a way to add a Listener for dynamic named cloud variables and saw these two posts that have since been closed that did not have solutions:

> [@Listener for dynamic named cloud variable](https://community.thunkable.com/t/listener-for-dynamic-named-cloud-variable/1989314):
>
> I have looked but am unable to find out how to listen to a dynamic named variable stored in a firebase to enable peer-to-peer communication.

> [@How to create a cloud variable listener for a sub-bucket?](https://community.thunkable.com/t/how-to-create-a-cloud-variable-listener-for-a-sub-bucket/2140238/5):
>
> hi it turns out that I have already tried with a timer but it flashes the dvl corresponding to the bucket that I am monitoring in your second proposal, what bothers me is that my buckets are created dynamically and are used interchangeably and I do not see in the block above how to have it modified so that it corresponds to the modified bucket I had to leave all my energy on the clones pensive

So I meditated on what @drted had shared in this topic and figured I’d try the Realtime DB Add Listener block to see if it would work and it did. Then I saw your reply all the way at the bottom of this topic afterwards when I wanted to give @drted credit for this discovery that I just discovered that you had already beat me to (after a couple hours of almost giving up). Here are the screenshots of my example:

 ![Screenshot 2024-02-18 191747](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/9/a91cd18fd09382ffc93742a64c3065b5b833096c.png)  
 ![Screenshot 2024-02-18 191758](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/2/6240e486925260015c2426feff61af6c297757ac.png)

This is so valuable for me since only Cloud variables synchronize across different screens of the app with variable listeners. Listeners for dynamically named Cloud variables and sub-buckets makes it even better. PEace

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 12:19pm UTC](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738/31 "2024-11-08T12:19:54Z")

</div>



[Previous page](https://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738.md?page=1)
