Note: This article references the State(parent) and City(child) for all examples. Your use of this function will vary, but the concepts are the same. |
Overview
Parent/Child dropdown custom data fields allow a dropdown field to automatically populate a value based on the selection of another dropdown field. They are useful to ensure the proper selection is made relative to an initial selection. Dropdown custom data fields with a Parent/Child relationship are useful for many occasions.
In the example image above, a state is selected and, subsequently, a city automatically populates the second field.
Additional Example There may be an event where a meal is chosen. If a meal is chosen, that person is coming to the event. By selecting a meal (parent), a second "attending?" field (child) could be automatically set to "yes." |
Setup
To access the setup screen for these relationships, go to Admin > Matter Types > {your_matter_type} > Matter Data > {your_data_collection}.
Here, you can edit your Parent and Child fields.
Note: In the image above, the state field will be the parent, while the city field will be the child. this will ensure that city automatically populates based on the state selection. |
Parent settings (State)
The Parent data field requires little specific setup. The important thing is that the Stored Value field needs to be populated. This is the value that will be referenced by the child field.
Child settings (City)
There are two data points that must be included in the Child field to make the link with the Parent field. They are the Parent dropdown field designation and the Parent Stored Value.
Parent dropdown field | This field provides options for all dropdowns for the current custom data collection. The selection made in this field designates the parent field. In the image example, State is the selection. This will be the parent filed of the City field. |
Parent Stored Value |
This field must reference the value of the Stored Value field in the parent dropdown. Example
The stored value in the State(parent) field is "Michigan."
In the City(child) field, the Parent Stored Value field is set to "Michigan" for the "Detroit" option. This ensures that, when "Michigan" is selected in the State dropdown, the City dropdown automatically selects "Detroit." |
Functionality
The result of a proper setup is selecting a value in the parent field, the child field automatically populates a value that has been linked.
Note: When a parent dropdown field is added to a step change, the child dropdown will be displayed as well. This is to make it apparent to the user that the parent dropdown directly affects the value of the child dropdown. |