Available in: Axsy Mobile for Salesforce, Axsy Field Service, Axsy Public Sector, Axsy Retail Execution
Dependent Picklists are picklists who rely on a Controlling value, e.g. a selection made in a previous Picklist, and are a way to narrow down picklist options in an organised way.
Creating a Dependent Picklist involves:
- Creating a Standard Picklist to use as the Controlling value.
- Creating the Dependent Picklist that is controlled by the picklist in Step 1.
- Assigning both picklists to Picklist Elements in the Smart Form
To find out more on configuring Standard Picklists, please click here: Picklists - How to Configure a Standard Picklist
In the following sections, we will use an example where a user first needs to pick a category of food - either "Fruit" or "Vegetables" - and then select a food item from the previously selected category.
Configure the Standard Picklist
Your Standard Picklist should contain the values of your categories - in this example, "Fruit" and "Vegetables" - and should be linked to the first Picklist Element. This will be the Controlling Picklist.
Configure the Dependent Picklist
Next, create the Dependent Picklist:
- Navigate to the Manage Picklists button in the Designer and select Create Picklist. In the same manner as a Standard Picklist, rename it under the Details tab and then navigate to the Values tab.
- Select Add Controlling Value for each possible controlling value - twice, in this example, because there are only two values in the Controlling Picklist.
- In the Controlling value fields, enter the values in your first Controlling Picklist, in this case "Fruit" and "Vegetables". Then enter the options you want to appear when the user selects a controlling value in the List of values fields.
- Save your changes.
Assign the Dependent Picklist to a Picklist Element
- Edit your second Picklist Element. Ensure it comes after the Picklist Element linked to the Controlling Picklist.
- Navigate to the Picklist tab and select your Dependent Picklist to link it to the Element.
- Click Save on the Element Properties Window.
- Save your changes overall.
- Now go back into the Edit Properties Window for the second Picklist Element. A Controlling Element input should appear.
- Search for and Select the Controlling Element linked to the Controlling Picklist and click Save.
With this done, depending on the value the user selects in the Controlling Picklist Element, the values of the second Picklist will be populated based on that choice.