Cascading Listcombos (CLCs) allows you to show an end user filtered field values based on their previous selections. It's similar to setting dropdown values from a spreadsheet or app data but it is more performant and the logic is easier to understand. CLCs can be used with Forms Builder or with the Wizard.
Before We Start ...
This tutorial will assume your understand the following concepts:
Building Blocks for a Cascading Listcombo
List Dictionary Provider (LDP) or Transaction List Provider (TLP)
The first thing you need is a list. It can either be a List Dictionary Provider (LDP), meaning the data source is an uploaded spreadsheet, or a Transaction List Provider (TLP), meaning the data source is from another app.
Two or More Listcombo Fields
The second thing you need are two or more listcombo fields. If you don't have at least two listcombo fields created in your app then you will see the message "Not enough Listcombo or Multiselect fields have been associated with the list. Cascading Listcomobs require at least two fields." (shown below) when you try to build a Cascading Listcombo.
How to make Corresponding Listcombo Fields
On the Datamodel page, create listcombo fields that correspond to each level in the List that you plan to use. For this tutorial, I will be using the Mattertypes List which has three levels and a hierarchy from top to bottom of:
- Area of Law
- Matter Type
- Matter Sub Type
The goal for when these levels are translated into a series of drop-downs is to only show Matter Types that correspond to the Area of Law that was chosen by the end user and then only show Matter Sub Types that correspond to the Matter Type that was chosen by the end user. This responsive filtered dropdown functionality helps end users pick the correct option by limiting their options to only relevant choices.
Note that not every entry on the list has a Matter Sub Type. It is not a requirement that every tier in the list hierarchy is full.
A minimum of two listcombo fields are required for a CLC so be sure to use a List that has at least two levels.
Each of the listcombo fields that I create for the CLC will have the same Search Column and Value Column value selected that corresponds to the level that field is meant to capture (as shown below). In other words, the field named Area of Law will search the Area of Law column in the list and show the end user the value that was found in that same column. The same is true for the field named Matter Type and Matter Subtype in which the column searched and column where the field value is found is Matter Type and Matter Subtype, respectively.
You can verify which type of List you have selected by checking the acronym in parenthesis next to the name of the List.
Creating a new Cascading Listcombo
Now that we have the building blocks in place, we are ready to start creating a Cascading Listcombo.
(1) Click the Cascading Listcombos sub-section from under the App Builder section
(2) Open a new configurable form by clicking the blue plus-sign
(3) Name the CLC
(4) Select either a LDP or TLP from the List dropdown
After a list is chosen, the prompt to +ADD LEVEL will appear which allows you to add the listcombo fields that use the chosen list. The appropriate fields will appear in a dropdown.
Add as many levels as needed to achieve the CLC that is needed for your app. In this example, there are three levels: Area of Law, Matter Type, Matter Subtype. When there are no more levels that can be added the prompt to +ADD LEVEL will become grayed out. Save the CLC by clicking the Save button in the bottom right-hand side of the form.
Test the Cascading Listcombo
From the App Dashboard, launch a form and test out the Cascading Listcombo that you just created.
From a Record, edit the form and test out the Cascading Listcombo that you just created. When you update a record by selecting an option that doesn't have a sub-level then that field and the field value will disappear from the record. When Area of Law was updated to Commercial and the Matter Type was updated to Confidentiality Agreements there was no longer a relevant Matter SubType so that field is no longer on the record (as shown below).