Controls Other Fields

Overview

The Controls other fields/Data Sets option is available for Picklists, Multi-Select Picklists, and Lookups with a Field Display Type of Picklist.

Note:
When you build criteria/conditions for Record Selection, Required, Read Only or Auto-populate, you must reference the API names of picklist values; not their display names. And your picklist value API names must not contain punctuation, such as commas. Punctuation marks in picklist API names will cause picklists controlling other fields or referenced in conditions to fail.

Values available in a “controlled” field are refreshed whenever its “controlling” field changes. Setting “Controls other fields/Data Sets” to TRUE on a controlling field will bring up a list of fields and datasets, which can be made to refresh when the controlling field changes:

  • Picklists (plain or multi-select) can control Picklists (plain or multi-select)
  • Picklists (plain or multi-select) can control Reference fields (Lookups), displayed as picklists
  • Picklists (plain only) can control Data Sets
  • Reference fields (Lookups) displayed as picklists can control Reference fields (Lookups)
  • Reference fields (Lookups) displayed as picklists can control Data Sets

Control of Picklists and Multi-Select Picklists

This section covers how to configure the dependency when the dependent field is a picklist or multi-select picklist. On the controlling picklist or multi-select picklist field, first set “Controls other fields” to TRUE.

Check the box next to each field that should be controlled, and a dependency table will appear. Select Configure Dropdown next to the dependent field in the table to set the dependency.

If your controlling field is a picklist, select a Controlling Field value from the dropdown to see a list of possible Dependent Values. Check the box next to each dependent value that should be available for the chosen Controlling value. A table of Configured Values will display the existing selections.

If your controlling field is a multi-select picklist, select one or more Controlling Field Values values (hold Control and click to select multiple values). Check the box next to each dependent value that should be available for the chosen Controlling value(s). Click Set Values to confirm the dependency. If more than one Controlling value is chosen for a single Dependent value, then each value must be selected for the Dependent value to appear.

Below is an example between Gender and Salutation picklists:

Control of Lookups

This section covers how to configure the dependency when the dependent field is a lookup type field.

Controlling Picklist (or Lookup displayed as picklist)

If the controlling field is a Picklist or a Lookup with Field Display Type set to Picklist, first set “Controls other fields” to TRUE. Check the dependent lookup. Unlike with a dependent picklist or multi-select picklist, you will not be presented with a Dependency Table. Navigate to the dependent lookup field and open it to see its Configuration dialog. In the Record Criteria section, set the appropriate criteria, referencing the controlling field. Now, whenever the controlling field is updated by the user, the values available in the controlled field will be re-calculated; If this criteria is set without indicating that the criteria field is a controlling field, it will not work properly on the page.

Controlling Lookup

If the controlling field is a Lookup with Field Display Type of Reference/Type Ahead then “Controls other fields” is not displayed and does not need to be set. Only the Record Criteria on the dependent lookup needs to be set so that it references the lookup field that should control it. To have a dependent relationship between lookups, it is necessary that the object to which the dependent field looks up has a lookup relationship to the object to which the controlling field looks up. That is, the object referenced by the controlling field must be a parent of the object referenced by the controlled field.

For example, say a dependency must be set between Program Catalog and Program Offered, such that a lookup to Program Catalog controls which options are available in a lookup to Program Offered. The Program Offered object must itself have a lookup to Program Catalog to establish this relational control.

Control of Data Sets/Lists

List Components are populated by a Data Set, so, refreshing the Data Set will refresh the List. Picklist fields and Reference fields displayed as picklists may be used to trigger a refresh of a Data Set and, thereby, a List. These controlling picklist and reference fields may be virtual fields.

For example, you may display a list component of a Contact’s several applications (to various programs over a period of years). You may want to offer a filter on this list of applications, for example, by term. You can create a virtual reference field looking up to the Term object, and displayed as a picklist, that you can put on the page and use to control the Applications Data Set (and thus the list of applications) like this:

The list will refresh when the virtual field changes, provided the virtual field is referenced in the Data Set Record Criteria like this:

Notes and Exceptions

There are additional factors to consider when setting up controlling and dependent picklists:

  • Lookups that are controlled by Picklists have their Field Display Type automatically set to Picklist.
  • A dependent field will not work properly if it has multiple controlling fields. As a best practice, a dependent field should only have a single controlling field.
  • Cascading dependencies may be set so that Field A controls Field B, and Field B controls Field C.