# Storing more than one value in Local Storage- old value gets deleted! Help!

**URL:** <https://community.thunkable.com/t/storing-more-than-one-value-in-local-storage-old-value-gets-deleted-help/45198>\
**Category:** Questions about Thunkable X\
**Created:** [September 5, 2018, 7:52pm UTC](https://community.thunkable.com/t/storing-more-than-one-value-in-local-storage-old-value-gets-deleted-help/45198 "2018-09-05T19:52:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RelapseDev](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/relapsedev/32/24765_2.png) [@RelapseDev](https://community.thunkable.com/u/RelapseDev)\
**Post date:** [September 5, 2018, 7:52pm UTC](https://community.thunkable.com/t/storing-more-than-one-value-in-local-storage-old-value-gets-deleted-help/45198/1 "2018-09-05T19:52:13Z")

</div>

Hi, I can’t seem to make this work. Every time I store a new value in a Local Storage object- even though it’s a different object- it overwrites the first! I’m storing a value from the previous screen in LocalStorage1. Then I want to store ‘Y’ or ‘N’ in LocalStorageQ2.

 ![Capture](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/8/f85c59bcb2ac6804397515ac5e4443c7d6e6da8d.PNG)

When I get to the final screen and pull up LocalStorage1 with a key (RowNumKey ) it has been overwritten with the Y or the N! So weird!

I have a totally different Local Storage and a totally different key- why is one overwriting the other?

---

<div class="post-metadata">

**Author:** ![jan\_hrabos](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@jan\_hrabos](https://community.thunkable.com/u/jan_hrabos)\
**Post date:** [September 6, 2018, 12:44am UTC](https://community.thunkable.com/t/storing-more-than-one-value-in-local-storage-old-value-gets-deleted-help/45198/2 "2018-09-06T00:44:07Z")

</div>

try to change keys, not use variable declaration, change it simply to string 🙂

---

<div class="post-metadata">

**Author:** ![RelapseDev](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/relapsedev/32/24765_2.png) [@RelapseDev](https://community.thunkable.com/u/RelapseDev)\
**Post date:** [September 6, 2018, 9:34pm UTC](https://community.thunkable.com/t/storing-more-than-one-value-in-local-storage-old-value-gets-deleted-help/45198/3 "2018-09-06T21:34:44Z")

</div>

Tried using the same Local\_Storage component with different keys, tried using different Local\_Storage components with different keys. Nothing works- only one value can exist at a time, no matter how many different keys I try.

 ![Capture1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/e/9edb15260125265f1893145e4172b347f5ae6a46.PNG)  
 ![Capture2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/e/3ea83d769c03a96df5ceec9e9b50fddd7b149fcb.PNG)  
 ![Capture3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/b/7bcbd8f8c321336904e1244cb4d7c319e3d2c610.PNG)

Here I have Local\_Storage1 and Local\_Storage2. Even though keys are different, and these are two different objects, once a value is entered for Local\_Storage2, it replaces the value in Local\_Storage1! So on the final screen, the result is that whatever the user entered for Local\_Storage2 always appears on the screen for both Local\_Storage1 and Local\_Storage2.

Am I missing something simple?

---

<div class="post-metadata">

**Author:** ![jan\_hrabos](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@jan\_hrabos](https://community.thunkable.com/u/jan_hrabos)\
**Post date:** [September 7, 2018, 3:02am UTC](https://community.thunkable.com/t/storing-more-than-one-value-in-local-storage-old-value-gets-deleted-help/45198/4 "2018-09-07T03:02:28Z")

</div>

i dont want to make you angry man 🙂 i gave you idea that maybe change blocks from variable to “simply” string will solve your problem …

 ![Screenshot_2018-09-07-04-58-07](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/d/7d11f3f64eb864db5e9af5e2f885f1b30ecf0e35.jpg)

---

<div class="post-metadata">

**Author:** ![RelapseDev](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/relapsedev/32/24765_2.png) [@RelapseDev](https://community.thunkable.com/u/RelapseDev)\
**Post date:** [September 7, 2018, 4:17am UTC](https://community.thunkable.com/t/storing-more-than-one-value-in-local-storage-old-value-gets-deleted-help/45198/5 "2018-09-07T04:17:51Z")

</div>

Wow man that works!!! Thank you so much!!!

LOL I do not understand exactly why it works, but it works! Seems like different Local\_Storages should all be completely separate, whatever key (string/variable) you put in, so I wish I could understand the “why”! But I’m so happy to get this to work that I don’t care now!

Thanks again!

---

<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, 12:00pm UTC](https://community.thunkable.com/t/storing-more-than-one-value-in-local-storage-old-value-gets-deleted-help/45198/6 "2024-11-08T12:00:25Z")

</div>


