Tinydb with listview problem

HI everybody.
I have a problem and I don't know how to fix it.
When I in screen6 to add a data and I back to screen4 to see my listview , it will show the data I added before.
But when I do again it will cover last data

2 things:

  1. You do not appear to be changing screens correctly, this will eventually lead to a memory overload and your app will crash. Search the forum for solutions.

  2. On Screen 6 your globals for Reference and Name are not related to the globals of the same names on Screen 2. For things to work, you save the globals to the tinydb on Screen 4, then on Screen 6 your must initialise your globals with the contents of the tags in the tinydb in the same way you do this on Screen 4.

Sorry
I dont't know what your mean,so I use my way that I understand.
but it still will cover the data.
In this time, I put screen6 and screen4 combine together.

The point is, you just open new pages, and open and open ... but you don't close any. Once the page is opened, it remains open. It won't shut up by itself. When you open the same page several times, the memory overflows and the application crashes. Replace all such blocks:

For such:

Of course, replace "Screen2" with the appropriate screen names.

The second thing is block language. If you need help, change the language of the blocks to English, because they are unreadable for those who do not know Chinese as they are.

Sorry, I'm busy thest days.
So I'm always late to reply your question.
It's my code I convert to the English for you .

Apply the patch:

Sorry I'm fix this problem now.

Why do you use "Reference" and "Reference1" tags. Also "name" and "name1"? Modify the tags so that everywhere are only "Reference" and "name".

So if I update the data,I don't need create empty list to store update data ?

I'm delete the Reference1 and name1 ,also I Replace the blocks .
But when I change the screen and come back , I add the new data it also cover to last data.
please tell me how to fix this problem

When you update the data in the "Reference" variable, you will save this data to TinyDB under the "Reference" tag. On the second screen you load data from TinyDB from the "Reference" tag to the "Reference" variable. Do not save only new data, but all data.

Okay ,I got it ,I save all data and it can work .
Thank you for your help.
I really appreciate that.

Check, test, inform about the effects.

Sample project.

tinydb_list (2).aia (6.3 KB)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.