Simple operation involving Stored Variables is badly broken. It works intermittently. Please help. This was working 1 hour back. Quick help would be appreciated
Hello @anandavardhana57zwwl
It works in my test.
How did you test it?
Just as it is in Web preview on my Laptop. It did not work for my mentees too. It was very specific to stored variables.
@ioannis this is the original problem when we clicked MD nothing came.
- What are the exact buttons you’re pressing in order?
- What are you expecting to see after that?
- What are you seeing instead?
I tested it but I’m not sure how you’re supposed to store values for the MD button retrieval.
Thanks @tatiang
Very simple: Please click Button1 - Does not Work, Button2 - Works, Button3- Works. My assumption is printing stored variable has some issues hence Button1 fails. Please comment.
This is the result when I do that:
I don’t see how that’s a test of anything. You’re setting the stored variables at runtime every time the project starts. A better test is to set those values once and then see if they remain after quitting the app / closing the project.
And what I’m asking you is what do you want those three labels to show (if it was working)?
Try this demo I made:
Project link: Thunkable
(see the first screen)
Screenshot:
To use it:
- Type in a value at the top (or use the default value “Strawberry”).
- Click
Save to stored variable
- Close the preview / quit the app.
- Open the preview/app.
- Click
Restore saved value
. - You should see the value that you saved before closing the app (e.g. “Strawberry”).
Apologies @tatiang now I realize the reason for the confusion. It does not work on webpreview but you are right it does work on mobile phones. That is the problem and during developing and testing phase things not working in web preview is a big pain.
You can see my output on webpreview. There are many such issues/bugs in Thunkable, is there any solution for it? Or we just grin and bear it?

A note to myself if something seems odd to check it out on Mobile. Thanks again.
I don’t know how to answer your question because you haven’t stated clearly what the problem is.
Sorry, the problem is when using Webpreview method for testing an app, values stored in Stored variables do NOT get printed. In addition to that it blocks further execution as the as the last print statement also does not get printed. Please check the modified app I have enclosed.
In my demo project, I check to see if the stored variable is null when the screen opens. You need to do that for stored variables. You also need to set the stored variable once. Please review my demo because you’re still setting this up incorrectly.
Yes yours works perfectly well.
The the only diff between yours and mine is, you do it as a 2 operation I am doing it as a single operation. Why should mine fail. Sorry for bugging you so much.
Also just curious:
if (test value = ) {
test value =
}
Should it have been
if (test value ) {
test value =
}
I just duplicated what you did but just was wondering it was intentional or just a typo. In case the print not only fails but blocks further operation and exits.
I’m sorry, I don’t understand what you’re asking. Can you show it in blocks?
When you click Button1, it’s going to save “TopsyTurvy” to the stored variable and then set the label’s text to show that value.
But where is the part where you get the value from the stored variable?
It seems like you’re not reading what I’m posting. Can you share a link to your project?
Very sorry for the disconnect
Please advice thanks
I’m sorry that I can’t help you more. The project you shared has the same blocks as in your screenshot above which means you aren’t getting the value from the stored variable except when clicking the button to also set the value. I’m not sure why you can’t do this the way I showed you in my demo.
Someone else would probably need more information from you. You could start by explaining why you need a stored variable and what the saved value represents, etc.
Thanks @tatiang. We will just close this as Thunkable issue.
The issue is:
If you are doing a Web Preview on your Laptop and using stored variable the working of your app is flaky. Sometime it works some time it does not. What I have learnt is to test anything on the mobile phone before coming to any conclusion. Sorry for dragging this, this long. Closed thanks again.
best regards
Ananda