# App Stored Cloud variables

**URL:** <https://community.thunkable.com/t/app-stored-cloud-variables/2571707>\
**Category:** Questions about Thunkable X\
**Created:** [August 31, 2023, 4:58pm UTC](https://community.thunkable.com/t/app-stored-cloud-variables/2571707 "2023-08-31T16:58:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)\
**Post date:** [August 31, 2023, 4:58pm UTC](https://community.thunkable.com/t/app-stored-cloud-variables/2571707/1 "2023-08-31T16:58:39Z")

</div>

Hard times getting this to work - i tried thousand of version of this set up.  
Firedb shall set item 1 if there is no vlue before and the rise the number by one for the next registration  
,Somehow i either get null as respons OR i get item 0 updated and then next time it updated 0 again…

probably simle - but i dont see it… Do you (I troed set App , Stored and Could still not working  
Any ideas…

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [August 31, 2023, 6:54pm UTC](https://community.thunkable.com/t/app-stored-cloud-variables/2571707/2 "2023-08-31T18:54:18Z")

</div>

An _app_ variable will not work for that because app variables get reset each time the app launches. Firebase (_cloud_ variables) will work but is complicated. A _stored_ variable is your best bet.

Make sure when using a stored variable that you check if the value is equal to null when the screen opens and if so, set it to an initial value (such as 0).

Post a screenshot of the blocks you’ve tried with a stored variable and I can help troubleshoot.

---

<div class="post-metadata">

**Author:** ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)\
**Post date:** [September 1, 2023, 5:21am UTC](https://community.thunkable.com/t/app-stored-cloud-variables/2571707/3 "2023-09-01T05:21:35Z")

</div>

This works a bit. The first round artis is stored as number 1 in FBDB  
However, next artist should be number 2 - but its not - System overwrites number 1 only  
Instead of “change stored” i also tried “set artistNumber to artistNumber + 1” which does not work either…

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/0/c05906bfb8d15dedee9294a2eb49362cce923ba0.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [September 1, 2023, 5:49am UTC](https://community.thunkable.com/t/app-stored-cloud-variables/2571707/4 "2023-09-01T05:49:12Z")

</div>

You used the wrong variable blocks to change the value of the stored variable.

Since you already named the stored variable, use the change stored variable block at the **top** of the variables drawer. Do not use the change stored variable “ “ block at the bottom of the drawer (known as [Dynamically named variables](https://docs.thunkable.com/blocks/blocks/variables#dynamically-named-variables)).

The problem is that you’ve told Thunkable to change the value of the variable with [variable value] as it’s name.

---

<div class="post-metadata">

**Author:** ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)\
**Post date:** [September 1, 2023, 6:16am UTC](https://community.thunkable.com/t/app-stored-cloud-variables/2571707/5 "2023-09-01T06:16:08Z")

</div>

Obviousvly you solved it to me…\<3  
Again thanks 😃  
Case Solved and Closed

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [September 1, 2023, 2:20pm UTC](https://community.thunkable.com/t/app-stored-cloud-variables/2571707/6 "2023-09-01T14:20:27Z")

</div>

Glad to hear it! You can mark my post as the solution by clicking on the checkbox button.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [November 30, 2023, 2:20pm UTC](https://community.thunkable.com/t/app-stored-cloud-variables/2571707/7 "2023-11-30T14:20:44Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
