Understanding controlling fields (Field dependencies)
The field dependency feature creates a relationship between a controlling field and a dependent field. The controlling field determines the behavior of the dependent field, allowing you to dynamically choose values, show or make a field required based on user input.
Supported field types
Only fields with the Radio button, Single-select dropdown, or Checkbox field types can act as controlling fields in a field dependency setup. Dependent fields, on the other hand, can be of any field type, giving flexibility in configuration. This feature is supported across multiple modules, including Contacts, Companies, Pipelines, Sales Documents, and Products.
In the tasks module, field dependency support is limited. You cannot create a new dependency. There is a built-in dependency between Type and Status fields. You can make changes to the options to be shown in the Status field based on the selected Type.
Setting up field dependencies
- Go to Setup from the left sidebar menu, then navigate to the respective module. For modules like Contacts and Companies, the fields listing page opens immediately. For modules like Pipelines or Sales Documents, open the Fields tab.
- Click Manage Field Dependencies to view all available dependencies in the module. Click Add Field Dependency and choose a Controlling field and a Dependent field.
- Alternatively, locate the field you want to configure from the fields listing page.
- Under the Dynamic field behavior column, click Add next to the field. If this option is disabled, check if Show in create form under the Form settings column is checked.
- Select Controlling field from the options. This opens the Add Field Dependency drawer.
- Click the dropdown under Controlling field and choose a field to map.
- Under Dependent field, select the options to map if the dependent field has a field type that supports selectable values. If not, you can enable Show field. In both the cases, you can check Mark field as required if needed.
- Click Add to save to the dependency.
On the fields listing page, once a controlling field is added, options under Form Settings for the dependent field are automatically disabled. The reason is, either a field can be directly added to the create form or it appears based on the other field due to the dependency.
Behavior of controlling field in create form
In the create form, though the controlling field is directly included, dependent field stays hidden until a mapped value in the controlling field is selected. Once that value is chosen, the form updates instantly without requiring a page refresh, revealing the dependent field(s). The controlling field determines both their visibility and behavior, such as whether they appear as optional or become mandatory based on the selected value.
Example
A sales team wants to capture additional justification only for high-risk deals, without adding friction for regular deals.
Controlling field
- Field: Deal risk level (Single-select dropdown). Add this field to the create form.
- Options: Low, Medium, High
Dependent field
Field: Risk justification (Multi-line text)
Dependency
- If Deal risk level is Low, do not show Risk justification.
- If Deal risk level is Medium, show Risk justification but the field is optional.
- If Deal risk level is High, show Risk justification and make the field mandatory.
Behavior
On the create form, only the Deal risk level field is visible initially.
- When Low is selected, Risk justification remains hidden.
- When Medium is selected, Risk justification appears but not as mandatory.
- When High is selected, Risk justification appears and becomes mandatory. The record cannot be saved unless a value is entered.
- If the user changes the value from High to Medium again, the field Risk justification stays visible but is no longer mandatory.
- If the value is changed to Low again, the field Risk justification is hidden.
Behavior of controlling field in details page (inline editing)
On the record’s details page, all fields are displayed by default.
Editing a controlling field
Normally, when you edit a field, the edit popup opens with only that field. When you edit a controlling field and select a value that is mapped in a dependency, the edit popup dynamically includes the related dependent field and updates its behavior in real time.
If the dependent field is a selectable field, its available options are populated based on the dependency configuration. If the dependent field is non-selectable, the field is simply displayed. In both cases, the dependent field may be shown as optional or marked as mandatory based on the dependency configuration.
Editing a dependent field
When you try to edit a dependent field directly, the edit popup also includes its controlling field. If the controlling field already has a value that does not match the dependency configuration for the dependent field you are trying to edit, only the controlling field is shown in the edit popup.
Once you select a controlling field value that is mapped to the dependent field, the dependent field is automatically added to the edit popup and becomes available for editing, following the configured dependency rules.
Example
A sales manager wants to control when the Approval level field is required based on the selected Deal size.
Controlling field
- Field: Deal size (Single-select dropdown)
- Options: Small, Mid-market, Enterprise
Dependent field
- Approval level (Single-select dropdown)
- Options: Lead approval, Manager approval, Senior manager approval
Dependency
- If the Deal size is Small, do not show Approval level.
- If Deal size is Mid-market, Approval level should appear with values Lead approval and Manager approval but still optional.
- If the Deal size is Enterprise, Approval level should appear with a value Senior manager approval and it becomes mandatory.
Behavior
When you edit Deal size,
- When you open the edit popup for Deal size, only the Deal size field is shown initially.
- If you select Small, the Approval level field is not included in the edit popup.
- If you select Mid-market, the Approval level field is added to the edit popup with the options Lead approval and Manager approval, and the field remains optional.
- If you select Enterprise, the Approval level field is added to the edit popup with only the option Senior manager approval, and the field becomes mandatory. The record cannot be saved until a value is selected.
When you edit Approval level directly,
- When you open the edit popup for Approval level, the Deal size field is shown.
- If the current Deal size value is Small, only the Deal size field is shown, since Approval level is not applicable for this value.
- Once you change Deal size to Mid-market, the Approval level field appears with the options Lead approval and Manager approval, and remains optional.
- If you change Deal size to Enterprise, the Approval level field appears with only the option Senior manager approval and becomes mandatory.