Hi, I was trying to create an app where I can put names in a list with each of the matched quantities. The problem is that if I want to remove one of those names from the list (by selecting it from the phone) I can't ... what can I do?
Also I would like to be able to change the quantities associated with the products (always from the phone), how do I do it?
Thanks
You did not share your Blocks so we don't know Bart. What you do depends upon where your store the information (TinyDB, GoogleSpreadsheet on your GoogleDrive, FirebaseDB, CloudDB etc.) and we certainly do not know that.
Use Saja's advice to remove an item from a List (https://imagnity.com/tutorials/app-inventor/list-blocks-on-app-inventor/); if the List is in a database what you do is a little more complex.
I guess this is what you would like to do -
If this is not what you asked for, do what @SteveJG asked to...
I have these blocks ...
I have to be able to insert objects in the list, the quantities (x2) and be able to select each object inserted and check the quantity. I also need to be able to delete an object and / or change the quantity.
I have already looked at that page but starting from scratch I struggle ... couldn't you tell me what to change in my blocks? Thanks
Now I'm like this, when I press the delete button it changes the page, I select the object to delete but it doesn't delete it, why?
most of the people using this community can understand English, so it would make it easier for everyone, if you could switch your language to English before posting your relevant blocks...
Taifun
You have updated the list oggetti in tinydb, but you need to refresh the listview elements with that updated oggetti list
Could you write it with blocks? I'm not very practical, thanks
from your blocks already:
So?
That is OK when you initialise the screen, but not when you delete an item from your list inside the screen
so what should I do?
As I said, after you have deleted the item from the list, and updated the list in your tinydb, also refresh the listview elements with the updated list
could you see me with the blocks? In words I do not understand what I have to enter, thanks
Insert the block that TIMAI2 showed into the "procedura" procedure. For purple blocks.
solved, thanks.
now I have to create a button to change the quantity of an item in the list, what do I do?
Procedure call: move purple block "procedure" back to initialize.