Stored list variable

I’d like to store a list variable so I came with following blocks , but it seems not working.

Can you post a link to your project? It’s hard to troubleshoot this without seeing more of your blocks.

1 Like

@tatiang
Here is the link
https://x.thunkable.com/copy/2d629c5b500cf8c53d106463a18ee387
you will find What I want in screen 2
there a text input and when I press the a button it should add item to simple list items, In addition, there is a block to store the list as a stored Variable so when the app reopen the list will retain its items,


, but it’s not working.

that is great, you used just 1 variable,
But what is the role of those 2 blocks

A stored variable should usually be given a default value if you ever need to check it value before you set its value or potentially reference it for other logic before you set it. That’s absolutely problematic as there’s not great error handling for that kind of thing.

So, on app start initialize your stored variables and then give it a default value if it’s initially null unless that’s what you need it to be set to.

1 Like

Ok , Thank you Jared