# How does variable really works?

**URL:** https://community.thunkable.com/t/how-does-variable-really-works/1658868
**Category:** Questions about Thunkable X
**Created:** [December 22, 2021, 8:10pm UTC](https://community.thunkable.com/t/how-does-variable-really-works/1658868 "2021-12-22T20:10:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![fallency78](https://avatars.discourse-cdn.com/v4/letter/f/5f9b8f/32.png) [@fallency78](https://community.thunkable.com/u/fallency78)
#### Post date: [December 22, 2021, 8:10pm UTC](https://community.thunkable.com/t/how-does-variable-really-works/1658868/1 "2021-12-22T20:10:49Z")

</div>

Hello,

In my app, I have a Screens where I setup variables and an other screen where I use them, I set my variables as “Stored” and from what I read in the documentation, “stored” variables are stored in the device, but when I quit and close the App all of my variables are gone.Is there a way to keep the variables even if I close my phone ?

my blocs:

(Where I use the variables)

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

(Where I setup my variables)

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

a link to the app:  
[https://x.thunkable.com/copy/fcf8c66df9c406959e2fa31f233bbb94](https://x.thunkable.com/copy/fcf8c66df9c406959e2fa31f233bbb94)

What I want to achieve:  
You setup an URL and when you put the phone facedown, you go to this URL, you can store multiple URLs for differents results

thanks for your help

---

<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: [December 22, 2021, 8:57pm UTC](https://community.thunkable.com/t/how-does-variable-really-works/1658868/2 "2021-12-22T20:57:25Z")

</div>

Because stored variables aren’t initialized, they start with a null value. You need to check for null values when the screen opens. If the stored variable equals null then set the stored variable to “” (empty string) or whatever default url you prefer.

I recommend watching this video:

[![](https://img.youtube.com/vi/Dz-e7T8k1X4/maxresdefault.jpg "Using Stored Variables In Your Thunkable App [Snap to Place]") ](https://www.youtube.com/watch?v=Dz-e7T8k1X4)

---

<div class="post-metadata">

### Author: ![fallency78](https://avatars.discourse-cdn.com/v4/letter/f/5f9b8f/32.png) [@fallency78](https://community.thunkable.com/u/fallency78)
#### Post date: [January 1, 2022, 2:05pm UTC](https://community.thunkable.com/t/how-does-variable-really-works/1658868/3 "2022-01-01T14:05:59Z")

</div>

Thanks for the response that exactly what i’m looking for, Happy New year

By the way sorry for the late reply, the notification is in my spam folder somehow

---

<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: [April 1, 2022, 2:06pm UTC](https://community.thunkable.com/t/how-does-variable-really-works/1658868/4 "2022-04-01T14:06:17Z")

</div>

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