How do I remove a item from list picker?

I am trying to make it so that when I click on my remove glass size list picker, it shows the options that are available, then I need it so that when you click on one of the option it comes up saying would you like to remove yes or no. I am stuck on trying to remove items from the list, I think I will be able to do the rest of it with the yes or no part etc.
Below is my code. Thanks in advance.

image
Change to global glass_size.

Thank you, that made it kind of work. But the initial 3 in the first list dont all appear and when one is removed it sometimes adds one of the 3 that were pre set in the list back into the list picker for some reason. Any idea on how to fix this?

Because you are not storing the list (glass_size) in TinyDB, initially.
Do you want them to be added to the list every time the app is launched?

Can you share some DoIt results. Your statement is unclear. (to me)

Try this

2 Likes

When using Notifiers for confirmation, it is important to immediately rename the new Notifier component to mention the question it asks, like

  • Do you want cream in your coffee? (Yes/No)
  • Are you sure you want to launch the Nuclear Missiles? (Yes/No)

It is also a good idea to use more specific text in the expected response, like

  • Cream/Black
  • Launch/Recall

to avoid last instant confusion.

Right thank you for this, it works well. But I needed it on a seperate list picker, and when I changed it over to list picker 2 and I try to remove an Item it says "Remove list item: Attempt to remove 0 of this list ["Can (330ml)", "Whiskey Tumbler (250ml)", "100"] The minimum valid item number is 1.
Any idea on how to fix this. Thanks in advance.

Post a screenshot of your blocks


Thank you

Change from ListPicker1.Elements to ListPicker2.Elements and from ListPicker1.SelectionIndex to ListPicker2.SelectionIndex

Yes I should have seen that, thank you works perfectly now.