When creating an app, you’ll often want users to select predefined values from a dropdown. In many cases, you can use a basic Combo Field to accomplish this (without a spreadsheet), and you can specify each possible dropdown option by typing them into the Field’s definition (within the Wizard).
In other cases, however, manually typing the dropdown values into the wizard may become unwieldy. This is especially true when:
- You have lots of dropdown values.
- The dropdown values are likely to change.
- You have a series of dropdowns that are all chained together from a filtering perspective. That is, when a user chooses the value in one dropdown the values in separate and secondary dropdown should be filtered.
In these situations, you’ll want to prefer a Listcombo Field (tied to a spreadsheet) over a Combo Field. Instead of manually typing the dropdown values into the Field’s definition, you can configure the Listcombo Field to pull the values from an Excel spreadsheet. Maintaining the dropdown values in a spreadsheet will often be significantly easier.
In this tutorial, we’ll explain how to work with Listcombo Fields.
Note: In this tutorial, the words List and spreadsheet are used interchangeably.
Before We Start ...
Let's Get Started!
After you've correctly formatted and imported your List, we can jump over to the Wizard to create some Listcombo Fields.
In this tutorial, we’ll be using the spreadsheet pictured below to pull in values for two Fields, area_of_law and matter_type.
1. Configure Your Listcombo Fields
To create a new Listcombo Field, Add a new Field in the Wizard and set its Type to Listcombo.
Find the name of your imported list in the List dropdown and select it.
The Search Column dropdown will display a list of all the fieldLabels from your list. Select the fieldLabel that corresponds to the column of data that you want used as your Field’s values. So for our area_of_law Field, we’ll select area_of_law as that’s also the name of the fieldLabel in our spreadsheet.
You must also select a fieldLabel from the Value Column dropdown. This will be the data displayed on the dashboard grid and is typically the same fieldLabel used for the Search Column. In our example, we’ll also select area_of_law for our area_of_law Field’s Value Column.
We’re going to create two Listcombo Fields, one for area_of_law and another for matter_type.
2. Setting a Listcombo's Filter Properties
Similar to the Filter By property available for regular Combo Fields, we can also set a Listcombo Field to filter off the values of a separate field.
In our example, we’ll have our matter_type Field values filter off our area_of_law Field. To do this we’ll select area_of_law from the Filter Column dropdown and from the Filter By dropdown, where the former property refers to the column name in the spreadsheet and the later references the Field itself in the wizard.
Update your app.
Check it Out
And that’s all there is to it! Update your app and check out your new Listcombo Field in the launch form.
As you can see from the first screenshot below, when a user selects the area_of_law Field, the values that appear are pulled directly from our Excel spreadsheet:
After a user has selected a value from area_of_law, the values of matter_type are filtered accordingly:
- If you need to create more than one Listcombo Field which pulls values from separate spreadsheets, you'll need to create these Listcombo Fields one at a time and save your app in between.