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:-

Makeroid%20Builder%20(2)

get data from tinyDb using list:-

Makeroid%20Builder%20(1)

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

@maddevs

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