List not Keeping Previous Value using TinyDB

I want to make a list using tinydb.When i click button , then it will added list and working fine.
but again i want to add something.previous value was not keep in the list.
After i test it appybuilder, where it working fine.

see images

make a list:-


get data from tinyDb using list:-


Now, please give a solution how to keep previous value using tinyDb.
i trying it but failed in makeroid.


Your code stores only one item in the list. Is that intended? You might want to join more item blocks by clicking the blue cog beside add items to list, and then store the input_txt.Text and output_txt.Text in separate items.

Also, try using not(is list empty? list(global fav)) instead of global fav ≠ create empty list.

1 Like

not understand.

Try to add some blocks to the „when Screen Initialize“ event:

When Screen1.Initilaize
Set global fav to. Call tiny_db1 GET VALUE (tag/value)

Your list is empty at every initialize.
Let me know if it works.

And please check if you clear your tinyDB tag or your list somewhere

1 Like

i make only one list.and all item add to the list, item comes from the textbox.
but when i add more text, previous value wasn’t keep.

Before adding new values, set global fav to TinyDB.getvalue(tag).

i need not to get data when screen initialize.when button click then i need tinyDb value.

Another thing. if u use same tag to store than it will replace the previous value

1 Like

but i make a list first,then store.
now working fine.

1 Like