Help the numbers double

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.

Hello friend, I'll leave you there, I can't find the solution to the duplicate.

remove this block:

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.

1 Like

Can you help me, I am dismantling my project

riverasabado (1).aia (136.8 KB)


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:

1 Like

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.


why you are adding a list to a list? does it make sense?

upload your aia here, I will have a look.

riveramartes_mod2 (4).aia (206.0 KB)

i did not see any problem.
except: why not use a listview but a label?

ListView.Elements is a list so, you can do something similar you are already doing with the other sum

Thank you very much, that's fine, sorry if I don't understand, I'm from Peru, Spanish, my English is complicated, I have to translate the comments into Spanish, I'm advancing my project, then I can publish it when it's ready so you


can download the ones you need for a winery or minimarket.

1 Like