Multi Select Drop Down with data table live update

Hi all,

I am new to programming, so my code may not look that great. In this example, I reused codes from other posts. My goal was to make a drop-down list that when one of its items selected, it adds a button component to the form and at the same time: 1) remove the selected item from the list
2) add the selected item to the data table
And when the button clicked; it removes itself from the form and its text from the data table, and add it back to the list.

Here is the copy of the app: https://anvil.works/build#clone:VE4W2AU5PA7HEGZX=M7T3EQ265BVHM5WVIFO7A7UZ

Please make sure you change the table permissions to allow the client code to write on the table.
Any suggestions to make this code more efficient are welcome.

Thank you

2 Likes

Hi,

Here is an updated version of the app (for some reason I can’t edit the post itself)
https://anvil.works/build#clone:7OZJKQKXP6HRBCAL=GMPXCP2TZ73T4E7XAO5A6QZP

Here’s a version that has some slight alternative approaches

https://anvil.works/build#clone:V7JGGXTNBRCMYKQ7=UQW7JZUKUM2VJJ6BDUIXCU2A