Cannot recover data when restarting the application

I’m having trouble. I can’t solve it.
when I restart the app the information is not saved. They are reset every time I start the application.

I thank you in advance for your help.

When you restart your app the variable auto_tag is 0, so the for each block doesn’t execute.

1 Like

Error in logic
You intialize auto tag to 0 and
In for loop from 1 to 0 by 1 so its doesn’t loop to get value

1 Like

So would I do with a list?

You must know how many items you have stored. So in another tag in you tinydb every time store the count and when your screen initialize first get this value and use it in your For each loop.

can anyone show me the error?

I’ve been trying to solve it all day. I can not.


well, you received loads of good answers… what exactly have you tried to fix your issues?
you might want to provide an updated screenshot of your relevant blocks…

also what about using Do it to debug your blocks?
see tip 4 here App Inventor: How to Learn | Pura Vida Apps