When you start your app it will open screen 1, this will run
but nothing will show in the screen.
if you move to screen 2, this will run
You will see this is toto in the label in screen 2
When you move to screen 3, this will run
so only one label will show this is tata and the button will show false written on it.
When you type anything in the text field and press one of the buttons the text you typed will show in label3 or label6 depending which button you press
Now, watch carefully wat happens
if you move to screen 1 both stored variables will reset to the code in screen 1.
if you go back to screen 3 only one label will show the value because this is the code in the screen open block.
Stored variables are used to hold values that will not change a lot such as the user name so it is not expected to change with every screen. But your app is treating it as an app variable and it acts as it should.
Hope this is clear. Please feel free to ask for any specific detail.
Stored variables are used for anything that you want to keep it even after the user exits the app so that your app remembers it next time the user open the app.
Stored variables are stored in the user phone so it makes sense to use it to save user settings for example or user ID.
In my sample app I’m storing a list of notes the user wants to keep it even after closing the app.
In some cases, you can use stored variables as local DB to save small size information.
Do the users need to access their own data on multiple devices?
Do you need access to the data stored for all users?
Do you need to prevent some people from using the app?
Because it’s possible that you don’t need a sign in feature at all… that you just need to store the user’s data on the device. That doesn’t require a sign in.
When you use stored variable to store the data for app1 you will not see it when the user uses app2. Stored variable is saved in the user’s phone but it is private for the app that stores it.