If you would like to create related select boxes, you can use the custom field type linked select. Creating a linked select will effectively create two select boxes such that, when the user chooses a value from the first, a specific set of options appears for selection in the second.
For example, you could use a linked select type custom field to set up two custom fields - 'Country' and 'City', set up in such a way that, when the user selects Australia as the 'Country', the 'City' field lists only the cities mapped to Australia.
This article includes the following sections:
About Linked Select Fields
A linked select field contains a parent list and a sub-list. The values of the parent list are linked to different values within the sub-list. Here is the screenshot of a sample configuration.
- Under the Custom Fields section, the first field is where you type the parent-level custom field name. If you wish to cascade Country to City, you should enter 'Country' in the first field.
- 'Country' and the options below that represent the first-level list or the controlling custom field. You can map the options in this list to one or more values in the sub-list.
- 'City' and its options represent the linked, second-level list.
- If the 'Country' custom field is mapped to initiative classification, you will see a list field named 'Country' and below it another list named 'City'.
- 'Australia' is linked to 'Sydney', 'Melbourne' and 'Brisbane'. This is an example of a link between the two fields. In this case, if the user selects 'Australia' from the 'Country' custom field, only the linked values display for selection in the 'City' field.
The Bulk Add option allows you to copy and paste data in bulk from an Excel file.
Creating Linked Select Fields
You can create cascading custom fields globally, as described below, or create custom fields at the program level.
To create a linked select field:
- From the upper-right corner, click on your user name or avatar and select Administration from the options list.
- Select the Custom Fields tab.
This will display the list of existing custom fields. - Select Linked Select from the Control drop-down list.
- Enter a name for the field.
- Use the Classifications drop-down list to select the classification to which the field will be mapped.
- Configure the first and second list options in the fields under Custom Fields:
- Enter the name for the parent list in the text field in the first column.
- Click Add new to add options in the fields below. TIP: Pressing 'Enter' will swiftly take you to your next option.
- Enter the name for the sub-list in the text field in the second column.
- Add the sub-list options in the fields below.
- Click Add new to add more. Alternatively, you can use the Bulk Add option to add multiple options in bulk.
- Specify links between the parent list and sub-list options.
- Click on the link icon in the option field.
You'll see checkboxes next to all options in the sub-list. - Select the options that you want to link the parent item to.
- Repeat until all options in the parent list are linked to at least one item in the sub-list.
- Click on the link icon in the option field.
- If you mark the custom field as a mandatory field, select Mark this custom field required.
- Click Save to create the cascading field.
Setting up Program-level Linked Fields
Program administrators can add custom fields to their programs or projects. It is also possible to add them to individual project items. This is done by selecting the control type as Linked Select. For more details about adding custom fields to programs, see Configure Custom Fields.
Testing the Linked Field Configuration
To verify the custom field configuration, map the field to initiatives, go to the Properties tab, and select a value in the first field, now check the sub-list values. You should only see the linked options. In the above example, selecting 'Australia' as the 'Country' should list ' 'Sydney', 'Melbourne' and 'Brisbane' in the City field.
Comments
0 comments
Please sign in to leave a comment.