[Solved] Local Storage setting text not getting or saving when screen opens

I have two pages, one where the user can increment a variable and the first second page has a label where the user can see their incremented variables.

I’m saving the text of the label and getting it when the page opens on the first page. It’s not saving or getting the variable when I reload or reopen the page, and I’m not sure why?

here is a snippet of the code on the first page:
I set the label with the variable that was increment on the other page then I save it as "totalAssignments) then I also get it as shown below.

the second page just has a button that increments the variable, “total assignments” by 1 each time it’s clicked

I’m not sure where my problem is occurring? Is it because I’m saving and getting when the screen opens?

Thunkable link:

If I should Include more detail, please tell me!

There is currently an issue in the start and open events.

Check this post

1 Like

I had a similar issue yesterday with an email input field.

It would be easier for me personally to be able to fidget with your actual code than to troubleshoot based in what I see… But having said that what I did to fix my issue is make the when screen opens block super simple. I had my other blocks set the variable to exactly what I wanted it to display and then set my when opens block to set the text to the variable.

I notice you have your block set up to set the text of label28 twice. Maybe start there and see if that’s the problem? Or you could set your save blocks up differently using variables to save the data instead of the local storage component. I read other posts that using a variable to store the data is a workaround to the type of issue you’re running into.

1 Like

I’ll check it out! Thanks!

@Kat_Rostova thank you! I tried to store it in a stored variable but I don’t think it worked for me? here’s my actual code: Thunkable

I noticed a couple of things. Looks like you had an extra variable so I deleted that and updated the block for screen 1 and then also updated the block on screen two. seems to be working now.


1 Like

IDK if you only sent me a basic copy with a lot removed or if that is what you have so far, but if you wanted to add where it would auto navigate back to the first screen when clicking the add button, it’s pretty easy to do that. Also to add a reset button on the first screen would be quick. If you don’t know how and would like to, lemme know. :slight_smile:

1 Like

Thank you! You guessed it was a basic copy, I figured out how to do to auto navigate back to the first screen, but thank you for the offer!

Sweet!! Happy to help! I hope it turns out to be everything you envisioned and more! :grin::grin:

1 Like


1 Like