Cannot add new data to the tinyDB list after restarting the application

I created a list that would be entered into tinyDB, but when the application was run and added data again, the data that had been saved was lost and what was saved was the newly entered data.

Please help me so that data can be added and the original data that has been entered into tinyDB is not lost after the application is closed

You need to recover the list stored under "menuName" tag, add/modified/remove the items you want over the list and then, store the list under the tag "menuName".

Thank You.
I will try it

It helps to add suffixes like _list or 's' to tags and variable names to remind you that they should contain lists, and never any non-list value like ' '.

For the default TinyDB value of a list, return Create Empty List, not text blank.

Succeed.
Thank You @ABG , @Ramon

I see three points of failure in those blocks.

  • Testing a label.text before it has a chance to change value
  • Using a non-list TinyDB default for a list
  • Doing number 2 twice

I use this command
image

Please example the correct block

It's hard to say what will be consistent with the rest of the app without seeing the rest of the app and knowing what the data will look like.

Give us samples for each variable and tag/value.

When you are expecting a list from TinyDB, the default value must be a list:
image