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

These are the available variable types
image

When you add a variable you can select what type you want to initialize it to
image

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

You can assign the variable different values using the set block
image

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

To read or display the value of the variable you use the block with the variable name this way.
image

The documentation is covering the same but in details.

Hope this makes it clear.

2 Likes