# Store variable stopping my app

**URL:** <https://community.thunkable.com/t/store-variable-stopping-my-app/1528439>\
**Category:** Questions about Thunkable X\
**Created:** [September 27, 2021, 12:14am UTC](https://community.thunkable.com/t/store-variable-stopping-my-app/1528439 "2021-09-27T00:14:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pablo](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@Pablo](https://community.thunkable.com/u/Pablo)\
**Post date:** [September 27, 2021, 12:14am UTC](https://community.thunkable.com/t/store-variable-stopping-my-app/1528439/1 "2021-09-27T00:14:57Z")

</div>

Hello everyone.  
My app is about tourist places. I made a button to add the places to favorites and save them in a list on another page.  
Everything works fine only if I use “variable app”. When I try to use “Stored variable”, the app stops working with a message saying “Something has gone wrong. Check your blocks and reset this page”.  
The same happens if I start with the empty variable.  
I don’t know if it is only in the test app.  
What am I doing wrong? I leave an image of my block.  
Thank you.

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

---

<div class="post-metadata">

**Author:** ![namitnagar](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@namitnagar](https://community.thunkable.com/u/namitnagar)\
**Post date:** [September 27, 2021, 2:15am UTC](https://community.thunkable.com/t/store-variable-stopping-my-app/1528439/2 "2021-09-27T02:15:55Z")

</div>

We can’t see stored variable

---

<div class="post-metadata">

**Author:** ![Pablo](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@Pablo](https://community.thunkable.com/u/Pablo)\
**Post date:** [September 27, 2021, 3:04am UTC](https://community.thunkable.com/t/store-variable-stopping-my-app/1528439/3 "2021-09-27T03:04:30Z")

</div>

the “stored variable” would be “favoritos”.  
In the image is as “app variable” for the app to work.

---

<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 27, 2021, 4:08am UTC](https://community.thunkable.com/t/store-variable-stopping-my-app/1528439/4 "2021-09-27T04:08:32Z")

</div>

Stored variables are a little tricky because they start out with a null value. So you have to do `when screen opens` → `if stored variable = null` → `set stored variable to [some value]`. That value can be zero (0) or an empty string ("") or any other value.

---

<div class="post-metadata">

**Author:** ![Pablo](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@Pablo](https://community.thunkable.com/u/Pablo)\
**Post date:** [September 27, 2021, 5:21am UTC](https://community.thunkable.com/t/store-variable-stopping-my-app/1528439/5 "2021-09-27T05:21:49Z")

</div>

Thanks! works with this block:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/9/f9dff62f5471f6e460ddbfc49dad0fa0b96a0257.png)

---

<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, 1:15pm UTC](https://community.thunkable.com/t/store-variable-stopping-my-app/1528439/6 "2024-11-08T13:15:03Z")

</div>


