Explorer Series | Enable Users to Add Picklist Dropdown Menu Options

Have you ever been asked to select a response but none of the options apply? You can enable users to type in their own response, which is then added to the dropdown menu (aka a picklist) and to your domain table!

You can easily do this using automations in the Builder. Let’s see it in action:

dyn

Set up visibility

  1. To start off, add a block and insert five components: a content box, a data cell bound to a picklist, an empty data cell, and two buttons. See the example below.

  1. Next, let’s set the empty data cell to show conditionally when the user selects “Enter my own” from the picklist. To do this, click on the empty data cell and in the right properties panel, select the the Display tab.

  2. Set the data cell visibility to:

=[Color]="Enter my own"

In our example below, we named our picklist column “Color.”

47%20PM

  1. Now, let’s set the active button visibility —we’ll add the automation later in step 6. Enter:

=AND([Color]="Enter my own",$[Color]<>"")

This button will now display only when the data cell shown above $[Color] is visible and has content in it.

17%20PM

  1. To set the disabled button visibility , enter:

=AND([Color]="Enter my own",$[Color]="")

This button will now display only when the data cell shown above ( $[Color] ) is visible and has no content in it.

58%20PM
:hammer: Builder tip: Our “disabled button” is simply a button that’s styled to appear disabled and has no automation associated with it. You can read more about app styling here.

Add the automation

Next, let’s dive a little deeper into the automation for the active button. When users add their own option to the picklist, we want it to display above “Enter you own,” which should always be the last option in the menu.

  1. Click on the active button and from the properties panel select the Actions tab.

  2. Select +Create an automation then hit the blue [+] and select Delete a row > Specified row. Enter:

=FindLastRow(Colors)

This will delete “Enter your own” from the picklist.

  1. Hit the blue plus [+] again and select Add a row to > [Table Name]. Take data from the value =$[Color] and write it to =[Color] . This adds the new row to the domain table and creates a new option in the picklist.

  2. Hit the blue plus [+] again and select Overwrite . Take data from =FindLastRow(Colors) and write it to the column =[Color] as a value.

  3. Next, let’s add “Enter your own” back to the picklist domain table by creating a new Add Row step. Take data from the value ="Enter my own" and write to the column =[Color].

  4. Finally, add another Overwrite step taking data from =$[Color] and writing to ="" . This lets users add a new option to the dropdown table and adds a new row to your domain table.

Following this overview will enable your team members to type in their own response when the other options do not apply. Doing this will also give you more data from users around critical functions or business needs, which would be a big win for you or your admins!

To learn more about Automations in Builder, I recommend checking out @Dan's Explorer Series Video: Builder Automations.

Not yet a Honeycode Customer? Sign up for our free version here.

5 Likes