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

**URL:** <https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202>\
**Category:** Questions about Thunkable X\
**Created:** [January 17, 2021, 11:07am UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202 "2021-01-17T11:07:59Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sp72979rdrlbc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sp72979rdrlbc/32/94224_2.png) [@sp72979rdrlbc](https://community.thunkable.com/u/sp72979rdrlbc)\
**Post date:** [January 17, 2021, 11:07am UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/1 "2021-01-17T11:07:59Z")

</div>

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.

 ![Thunkable - Google Chrome 1_17_2021 3_11_40 AM (2)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/d/4d906bf8727e3f606678e8adf5fcbdc61055310d.png)  
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:  
[https://x.thunkable.com/copy/01c1ebe83a09581d90d50835d9757404](https://x.thunkable.com/copy/01c1ebe83a09581d90d50835d9757404)

---

<div class="post-metadata">

**Author:** ![sp72979rdrlbc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sp72979rdrlbc/32/94224_2.png) [@sp72979rdrlbc](https://community.thunkable.com/u/sp72979rdrlbc)\
**Post date:** [January 17, 2021, 11:08am UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/2 "2021-01-17T11:08:31Z")

</div>

If I should Include more detail, please tell me!

---

<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:** [January 17, 2021, 11:18am UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/3 "2021-01-17T11:18:47Z")

</div>

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

Check this post

> [@Issue with "when Screen Starts" event since Jan 12, 2021](http://community.thunkable.com/t/issue-with-when-screen-starts-event-since-jan-12-2021/1047954):
>
> Hi there, out of nowhere and without me making any changes to the app, I noticed multiple things not working any more when testing in Thunkable Live on Android. Those are just the first three examples I noticed: On multiple screens: “When screen opens, from Label set text to XYZ” doesn’t work. List viewer literally just disappeared and isn’t showing any more on the screen. On one screen: “When screen starts, set labels to XYZ and background images to XYZ, then clone and set visibility to true…

---

<div class="post-metadata">

**Author:** ![Kat\_Rostova](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kat_rostova/32/93944_2.png) [@Kat\_Rostova](https://community.thunkable.com/u/Kat_Rostova)\
**Post date:** [January 17, 2021, 11:27am UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/4 "2021-01-17T11:27:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sp72979rdrlbc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sp72979rdrlbc/32/94224_2.png) [@sp72979rdrlbc](https://community.thunkable.com/u/sp72979rdrlbc)\
**Post date:** [January 17, 2021, 12:03pm UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/6 "2021-01-17T12:03:19Z")

</div>

I’ll check it out! Thanks!

---

<div class="post-metadata">

**Author:** ![sp72979rdrlbc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sp72979rdrlbc/32/94224_2.png) [@sp72979rdrlbc](https://community.thunkable.com/u/sp72979rdrlbc)\
**Post date:** [January 17, 2021, 12:05pm UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/7 "2021-01-17T12:05:46Z")

</div>

@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](https://x.thunkable.com/copy/01c1ebe83a09581d90d50835d9757404)

---

<div class="post-metadata">

**Author:** ![Kat\_Rostova](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kat_rostova/32/93944_2.png) [@Kat\_Rostova](https://community.thunkable.com/u/Kat_Rostova)\
**Post date:** [January 17, 2021, 12:32pm UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/8 "2021-01-17T12:32:56Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/2/126069fbbd5890f1ad54341d53d837921a41855d.png)

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/4/241b0adb86cb0e63246b31e3ca2642f8ff451954.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/7/4700036af0aed1feb8901bde4822a0a89216bc7f.png)

---

<div class="post-metadata">

**Author:** ![Kat\_Rostova](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kat_rostova/32/93944_2.png) [@Kat\_Rostova](https://community.thunkable.com/u/Kat_Rostova)\
**Post date:** [January 17, 2021, 12:37pm UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/9 "2021-01-17T12:37:01Z")

</div>

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. 🙂

---

<div class="post-metadata">

**Author:** ![sp72979rdrlbc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sp72979rdrlbc/32/94224_2.png) [@sp72979rdrlbc](https://community.thunkable.com/u/sp72979rdrlbc)\
**Post date:** [January 17, 2021, 7:25pm UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/10 "2021-01-17T19:25:12Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Kat\_Rostova](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kat_rostova/32/93944_2.png) [@Kat\_Rostova](https://community.thunkable.com/u/Kat_Rostova)\
**Post date:** [January 17, 2021, 7:31pm UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/11 "2021-01-17T19:31:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sp72979rdrlbc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sp72979rdrlbc/32/94224_2.png) [@sp72979rdrlbc](https://community.thunkable.com/u/sp72979rdrlbc)\
**Post date:** [January 17, 2021, 7:32pm UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/12 "2021-01-17T19:32:24Z")

</div>

Thanks!!

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:30pm UTC](https://community.thunkable.com/t/solved-local-storage-setting-text-not-getting-or-saving-when-screen-opens/1054202/13 "2024-11-08T13:30:46Z")

</div>


