# Stored and Cloud Variables are not working

**URL:** <https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948>\
**Category:** Questions about Thunkable X\
**Created:** [August 11, 2019, 1:31am UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948 "2019-08-11T01:31:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![abedo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/abedo/32/6468_2.png) [@abedo](https://community.thunkable.com/u/abedo)\
**Post date:** [August 11, 2019, 1:31am UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/1 "2019-08-11T01:31:11Z")

</div>

Hello  
My Stored and Cloud Variables are not working at all. neither on live testing or after installing .apk on my android device.

What to do?

---

<div class="post-metadata">

**Author:** ![samclever](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@samclever](https://community.thunkable.com/u/samclever)\
**Post date:** [August 11, 2019, 2:07am UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/2 "2019-08-11T02:07:45Z")

</div>

It honestly is best not to use those at the moment as they seem to be bugged. By that I mean that they seem to be causing MASSIVE lag within apps using initialized variables. I would recommend just using the local storage and Realtime DB blocks instead.

---

<div class="post-metadata">

**Author:** ![Hayder](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hayder/32/153829_2.png) [@Hayder](https://community.thunkable.com/u/Hayder)\
**Post date:** [August 11, 2019, 11:21am UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/3 "2019-08-11T11:21:17Z")

</div>

It works for me. Would you share your blocks as a screen shot, please?

---

<div class="post-metadata">

**Author:** ![abedo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/abedo/32/6468_2.png) [@abedo](https://community.thunkable.com/u/abedo)\
**Post date:** [August 12, 2019, 4:12pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/4 "2019-08-12T16:12:52Z")

</div>

@Hayder  
i cannot because all the app is cloud and stored variables, but i’m sure they have problem because one time they worked and after that they did not. Note: after they worked i did not make changes but after that they did work

---

<div class="post-metadata">

**Author:** ![abedo](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/abedo/32/6468_2.png) [@abedo](https://community.thunkable.com/u/abedo)\
**Post date:** [August 12, 2019, 4:13pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/5 "2019-08-12T16:13:48Z")

</div>

yes unfortunately, but this will increase the number of blocks

---

<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:** [August 12, 2019, 5:54pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/6 "2019-08-12T17:54:22Z")

</div>

You say that these variables do not work. That is, after writing these variables, they return null?

In these variables, you save a list, objects or values ​​of simple types - number, string, boolean?

---

<div class="post-metadata">

**Author:** ![Carlos\_Escobar](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/carlos_escobar/32/32404_2.png) [@Carlos\_Escobar](https://community.thunkable.com/u/Carlos_Escobar)\
**Post date:** [August 13, 2019, 2:53pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/7 "2019-08-13T14:53:01Z")

</div>

They are buggy, or at least when I use the bottom tab navigator, so e of them star to show null values ☹ I love Thunkable X, but I am finding so many bugs, that sometimes is difficult to work with it

---

<div class="post-metadata">

**Author:** ![BlueWhaleYT](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bluewhaleyt/32/28437_2.png) [@BlueWhaleYT](https://community.thunkable.com/u/BlueWhaleYT)\
**Post date:** [August 14, 2019, 3:47am UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/8 "2019-08-14T03:47:13Z")

</div>

They always return to null when leave the application 😥😥

---

<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:** [August 14, 2019, 10:31am UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/9 "2019-08-14T10:31:41Z")

</div>

Hello to all.

Global variables work really strange in some cases, but to understand the situation need to see the blocks you use. Perhaps you do not initialize lists in such variables and they really will not be saved - which works correctly.

Cloud variables do not guarantee data retention for those who do not understand. Where is the data stored in Cloud variables? On web-server. If there are problems with the server or some kind of failure occurs, hackers, tricks attacked, the database administrator drank beer and did something wrong in the server configuration, then the data, of course, will not be saved.

But the Stored variables, correctly initialized, should work like clockwork and even better. Data loss on Store variables is not allowed.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [August 14, 2019, 5:39pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/10 "2019-08-14T17:39:26Z")

</div>

> [@actech](#):
>
> Cloud variables do not guarantee data retention for those who do not understand. Where is the data stored in Cloud variables? On web-server. If there are problems with the server or some kind of failure occurs, hackers, tricks attacked, the database administrator drank beer and did something wrong in the server configuration, then the data, of course, will not be saved

Just to be clear, cloud variables are stored on a Firebase Realtime DB, just like our Realtime DB component. Certainly, Firebase could be down, but that would be a pretty serious Google outage. The user’s device could also be offline or out of internet range.

-Mark

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [August 14, 2019, 5:41pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/11 "2019-08-14T17:41:26Z")

</div>

> [@actech](#):
>
> Global variables work really strange in some cases, but to understand the situation need to see the blocks you use.

Yes, @abedo, please post a copy/share link to your project (see [here](https://docs.thunkable.com/share-1) for how) so that we can better help you.

-Mark

---

<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:** [August 15, 2019, 8:29am UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/12 "2019-08-15T08:29:49Z")

</div>

Unfortunately, in our country there was such a situation with Google.

---

<div class="post-metadata">

**Author:** ![BlueWhaleYT](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bluewhaleyt/32/28437_2.png) [@BlueWhaleYT](https://community.thunkable.com/u/BlueWhaleYT)\
**Post date:** [August 18, 2019, 3:25am UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/13 "2019-08-18T03:25:04Z")

</div>

![puffin](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/b/8be8e6d146d602afd3096ad6b5fefdeff9fd8151.jpeg)  
What if I quit the app then label 2 return to 0  
😓😓😓

---

<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:** [August 18, 2019, 8:41am UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/14 "2019-08-18T08:41:17Z")

</div>

1. How do you initialize the variable “stored coies”?
2. When you click on the button, what is in Label2.text?
3. 

> What if I quit the app then label 2 return to 0  
> 😓😓😓

Are you sure that in another place the value of “stored coies” does not change to 0? If the stored variable does not exist, then “null” will be returned. It returns 0 for you, which means that the variable exists and its value is somewhere set to 0.

---

<div class="post-metadata">

**Author:** ![BlueWhaleYT](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bluewhaleyt/32/28437_2.png) [@BlueWhaleYT](https://community.thunkable.com/u/BlueWhaleYT)\
**Post date:** [August 18, 2019, 12:06pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/15 "2019-08-18T12:06:53Z")

</div>

I’m making a mobfight app  
When button click,set Row 4 width -1 until Row 4 width = 0 (mob died)  
If mob died and random a mob,earn 1 coin  
If button click,set stored coins from clicking.  
I remember that I can do this without Local Storage or other database to do it before.

---

<div class="post-metadata">

**Author:** ![BlueWhaleYT](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bluewhaleyt/32/28437_2.png) [@BlueWhaleYT](https://community.thunkable.com/u/BlueWhaleYT)\
**Post date:** [August 18, 2019, 12:08pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/16 "2019-08-18T12:08:07Z")

</div>

I know my explain isn’t clearly,would you mind I send you the app copy 🤔🤔

---

<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:** [August 18, 2019, 12:38pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/17 "2019-08-18T12:38:15Z")

</div>

You can send me a project for viewing in a personal message.

---

<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:** [August 18, 2019, 5:55pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/18 "2019-08-18T17:55:59Z")

</div>

I looked at the project. On my Android, your “store” block works, saves and loads the value when you open the project. Error in your algorithm. Try step-by-step debugging to find out why Label2 is not initialized correctly when opened.is saved.

---

<div class="post-metadata">

**Author:** ![infiniment.soi.appfb](https://avatars.discourse-cdn.com/v4/letter/i/b19c9b/32.png) [@infiniment.soi.appfb](https://community.thunkable.com/u/infiniment.soi.appfb)\
**Post date:** [April 23, 2020, 4:26pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/19 "2020-04-23T16:26:32Z")

</div>

Hy everybody,

I reactive this post because I havn’t seen it solved and I have the same issue:  
=\> stored variable are usable in my project neither in live test nor in apk.

I try to just save from a previous session a list:

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

I propably made something wrong but I didn’t fund it after many trials.

Thanks per advance for your help

Charles

---

<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:** [April 23, 2020, 5:00pm UTC](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948/20 "2020-04-23T17:00:51Z")

</div>

when Screen1 starts, add these blocks

if stored save\_favoris\_list = null  
set stored save\_favoirs\_list = empty list

also, when you set app index = “”,  
change this to be = 0

This is better practice, you should declare your variable the same type you want to use it as. So if you want index to be a number, initialize as a number or nothing at all. If you want index to be text, initialize a blank text or nothing at all.

try not to initialize as a number, and then switch to text later on.

[Next page](https://community.thunkable.com/t/stored-and-cloud-variables-are-not-working/176948.md?page=2)
