# How do you use stored variables across screens in thunkable x?

**URL:** https://community.thunkable.com/t/how-do-you-use-stored-variables-across-screens-in-thunkable-x/1618889
**Category:** Questions about Thunkable X
**Created:** [November 16, 2021, 1:15pm UTC](https://community.thunkable.com/t/how-do-you-use-stored-variables-across-screens-in-thunkable-x/1618889 "2021-11-16T13:15:22Z")
**Posts on this page:** 1
**Showing post:** 5

<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: [November 17, 2021, 1:54pm UTC](https://community.thunkable.com/t/how-do-you-use-stored-variables-across-screens-in-thunkable-x/1618889/5 "2021-11-17T13:54:37Z")

</div>

These are the available variable types  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/9/19498a9d676f63b33bbaa994e1ee3e8e90584101.png)

When you add a variable you can select what type you want to initialize it to  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/d/fd2b141f0544f012e1b96ffa746c76e982c7cc56.png)

An `app variable` can have a default value (Initialized value). But the other two types can not be given a default value when initializing.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/3/b38b35fd100b734c26ac8c1ad8b776ff7b55fa6b.png)

You can assign the variable different values using the `set block`  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/6/f672ec02e2869e9b6ac9c0bc94cf75bf17ca1fcc.png)

The main difference between an `app variable` and a `stored variable` is that the `app variable` will retain its value as long as the app is in use. Once the app is closed, the `app variable` is removed from memory.

The `stored variable` will retain its value even after the app is closed. This is useful for setup options or to store the user name of the user of the app.

The other set of variable are `dynamic variables`. They can be used anywhere and do not require initialization.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/1/616dd045b9bb96b0c10dcd20e88df7ae31034fbe.png)

To read or display the value of the variable you use the block with the variable name this way.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/b/bbc0ac7e32ec9e383358c5f07cb4134a6a91d1fe.png)

The documentation is covering the same but in details.

Hope this makes it clear.

---

_[View the full topic](https://community.thunkable.com/t/how-do-you-use-stored-variables-across-screens-in-thunkable-x/1618889)._
