Dynamically add new values in dropdown input field

Hi

I have a table which basically acts as a source of dropdown for one of the forms in my app.
Although, I want the user to select an existing value from the dropdown when filling the form, I also want them to add a new value if what they are looking for doesn’t exist.

I tried to add another text input and write it to the same column, but unfortunately it wouldn’t allow it.

Anyone has any idea as to how this can be done ?


Aseem

1 Like

You will see a warning that two components are writing to the same column, but it will still work. I’ve used that method a few times.

1 Like

As @Jeff_Hager said, it will work writing to the same column, but could be confusing to the user if they see both components; and you need to answer the question, “Do I want to allow values that are not part of the choice component in the table?” In other words, do you want the random value they enter to be part of the choices for future entries? If not, then that will do. If you need those values to be available for future entries (and to standardize statistics and reports), then you may want to have a relation to the selection table based on the entry column, and in a custom action when writing/updating the row, also do a write to the selection table if the relation is empty (in other words, they entered a value not already in the selection list).

1 Like

Here’s what @David_Gabler is explaining:

6 Likes

The tagline used to be “There’s an app for that”. Now, with @Robert_Petitto , the tagline is, “There’s a vid for that!”

I love it!

5 Likes

Hey @Robert_Petitto (or others)!

Running into a similar but slightly different issue, and wondering if there is a work around or added functionality since this was discussed.

I have a bunch of different dropdown lists within my application that I keep within my own ‘Drop Down’ sheet. I have them organized in columns though and not rows. Is there a way to add ‘Other’ inputs to the columns? Hope this makes sense, let me know if I any clarification is helpful. Thanks!

Ya…no great way to handle “Other”. What I typically do is have an Other value in the list and a completely separate Other ___ field in the form that only shows up when they’ve selected other.

Like this:
CleanShot 2023-12-20 at 22.12.36

1 Like

Thanks Robert!

I have something similar built in my app. I think I figured out a way to accomplish what I’m looking for. I made an ‘On Submit’ action when the ‘Other’ field is filled out it adds a row under and adds the value to the corresponding ‘Dropdown’ list