I can't memorise Data

with the buttons (mesi/months) as I click i select what i wish to memorise, what I write in the Test_input1 to view it in List:Viewer1, with the long click i should see what memorised, there are as many blocks copies as many are the months, it works almost anything beside thaat it doesn’t memorise data, so when i restart the app everything disappears. What’s my mistake??

Can you show the block under “Long press” which you are talking about.

Or share the project so we can better understand the problem.

Following my observation:

  • You are saving the data to the Local Storage but you are not retrieving it anyway.
  • You are using the same key “Dati” for all buttons which means that you are only overwriting the data and not saving under different keys for different buttons.
  • The same blocks are repeated for every button which lends itself to “Function” which will lead in ease of maintenance.
  • You are not checking for duplicates before appending to the list which could result in the same thing being repeated.

Dear @alessio_puddu ,

I made simple changes to you code and changed button12 and button11. If you like the change you can make it for the other buttons.

This is the modified project Modified for Alessaio

This should make the information available even after closing the app and opening it again

I tried but at the Refresh I no longer see the previously written data

I tried to edit, and it seems to work, I agree