Lists and variables

Yes I like to elaborate. I am only coding what my professor told me to do, he wants everytime he clicks erase, the data changes and gets the last value stored and even when he leaves the screen or the app, the data stays there and he want 10 slots ( 10 tests registered)

What about creating a solution, where it does not matter, how many slots there are registered... 100, or 1000... or 10.000...

To give better advice, you have to explain the task more in detail

Taifun

In a screen I send all the values I want to a machine, in the other screen, I need to put the last values sent in a temporary slot (list), and when I click erase ( I have 10 buttons erase) it overwrites the test registed, it replaces the values of test 1 by the new values registered in slot 0. If i click the another button erase, it does the same job, imagine it like updating a test, and since you do a lot of experiences, you have 10 slots in your database dedicate it to the best 10 champion tests.

I click Update, and i'll get the values of Last saving in Test 1. I click Update of test 2, it will give me the values of Last saving. I want even when I leave this page, the values of all tests are still shown on the screen.

Here is my code for the first 4 buttons Update and I am already tired I still have 6 to go. And I need help with storing this data in order for it to always stays shown on the screen.

Your explanation is already too much in the details...
I would prefer the big picture... i.e. what is this app about...

Taifun

You are mowing the grass with a nail clipper

Send ing data to a machine via MQTT and receiving data. All of that works very good, now I need to add a memory page where I keep all the data I have sent.

I'm doing my best, a help with a suggestion will be very much appreciated.

Look into working with procedures and the advanced blocks

Taifun

I did, I didn't find how to show the test after I leave the screen for all 10 tests.

Maybe we should start from the beginning

What I understand is, you have 10 lists and each list has 10 items .. is this correct?
Let me suggest to have only 1 list, which has 10 sublists and each of the sublists has 10 items

Taifun

If you work with only one list, to erase a sublist just use the delete list item together with the index of the sublist you like to delete

Store the data in TinyDB and read it again from there during Screen initialize

Taifun

I only have one list called DATA, it contains 10 subsists and each sublists contains 10 items.

I don’t want to delete a sublist, I want to overwrite its parameters, replace the old values with the new pnes.

Very good

Which means, you like to replace a sublist
Use the replace list item block to replace sublist n with another list of 10 items

http://ai2.appinventor.mit.edu/reference/blocks/lists.html#replace

EDIT: to clarify, you do not have to replace each item of the sublist one by one, just replace the complete sublist in one statement

See also Imagnity.com List Tutorial, Mirrored - @Saj

Taifun

Or I can just put the values in the first sublist and everytime i click erase it automatically sets the labels of the test I clicked to the values of the first sublist.
Like i have showed previously. My problem is when I leave the screen I loose all the values except the first sublist because I inialize my screen with it.
How can set test 1 to 10 to always show values.

Store your list in TinyDB and read it again during Screen Initialize
Only on first run of your app read your initial values
How to find out, if you run your app the first time, see also this example App Inventor Extensions: SQlite | Pura Vida Apps

Taifun

That's what I have done I stored it under the tag Setting. I went to the other screen and Initialize my slot 0 that will hold my last values before I click Erase. The moment I click Erase, the values will go to Test 1 ( for example if I clicked the first Erase). Then I have to go to When Screen Initialized and set all the labels that hold the parameters. Since I have 10 tests ( 10 button erase as you can see in the picture above), I can't set all the labels, of all the buttons to a variable.

Why are there 10 erase buttons and what are they erasing? Is each button deleting another sublist of the main list? What about having only one button, which then first selects the sublist to erase (could be a spinner to select between 1 and 10) and then have only one set of blocks instead of ten different, but similar sets of blocks?

Taifun