Hi all
How to append list items into tinyDB ,without deleting the previous values
for example when i store to tinyDB a new list of items , tinyDB clears the previous values and add the new list . what happens is that ..
first time i open the app and select an item to save to DB and make a list of it and it goes ok , when i close the app and open it again the list also is ok , but when i add new list items to DB i found the last items i added only appear ,not all items i added
Hi, Moustafa.
You can’t add data to TinyDB ( last data store are there ). But can store TinyDB data into in a variable and add data to variable and last store this into TinyDB. I hope that it should be understood what I mean.
More easy:
If you store on tag “user” the values 1, 2, 3 and next store on the same tag the values 4, 5, 6. When you get TinyDB value of tag “user” you get only 4, 5, 6.
thank you yoshi for your time i used it but in the next time i open the app i see that it make a list of all items in the first item (a list in one item) and add the new in second or third so i found the solution with @WatermelonIce
thank you a lot these two methods are the same and and they are greate , first one worked great
the second i needed to change "value If Tag Not There " to create empty list
Btw, because you cannot define a variable as tinyDB GetValue, so you have to set it to an empty list first, then when screen initializeset variable astinyDB getValue