When adding a list of numbers, when I save the numbers, they double, example 6 to 66
Hello,
you are adding the new number to the list with the button Agregar:
After this, your list "listaNumeros" has the number "6".
Then you are setting the list like a string in the label "todosNumeros":
After this, your label TodosNumeros has "6"
And, with the button Guardar, you are adding again, the content of that label to the list:
So, you are adding to your list "listaNumeros" which already has the number "6", the content of the label "TodosNumeros" ("6"). So now, your list "listaNumeros" has two elements: "6","6"
Maybe, in Guardar block, you can remove that add to list block, because "listaNumeros" already has the number.
ahhh ok sorry I understood thank you very much
[image]
When saving other numbers, the previous saved ones are deleted.
Anyway, if you want to see in that listView a list of the totals, you need to use another list, to store the totals... and, of course, to get the values stored in the tinyDB.....
and make sure to delete the contents of tinyDB between tests, to ensure you run clean tests...until it works the way you want.
Try this (EDIT: upload new version, before one had an error):
riveramartes_mod2.aia (137.7 KB)
When click on button Guardar, the total is saved in a new list, that list is stored in tinyDB and it is displayed in the listView. Additionally, listaNumeros is reset to avoid accumulating numbers from the before sum.
Other additional functionality in listView. When you click any element you are asked about if you want to delete the item and, if "yes", then it is removed from listView (and from tinyDB).
And when testing:
you can add a ListViewer
It only shows me as elements ai 11 numbers, it does not add it, it only shows me as elements
This is all your blocks?
And change the language to English before post a screenshot.
you missed this.
ListView.Elements is a list so, you can do something similar you are already doing with the other sum