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

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.

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?

1 Like

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

2 Likes

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.



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?

1 Like

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

1 Like

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!

1 Like