Difference between revisions of "Dependent Picklist"
imported>Aeric |
imported>Aeric |
||
(12 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
A Dependent Picklist can be based on a set of [[Radio Buttons]] or a standard [[Picklist]]. The value of that field is the ''triggering value''. When that value is present in the record, or when the user selects a value in that GUI, the value determines which options are present in the Dependent Picklist. | A Dependent Picklist can be based on a set of [[Radio Buttons]] or a standard [[Picklist]]. The value of that field is the ''triggering value''. When that value is present in the record, or when the user selects a value in that GUI, the value determines which options are present in the Dependent Picklist. | ||
For example, suppose you have a request management system for a software application. In that application, you | For example, suppose you have a request management system for a software application. In that application, you might set up radio buttons to specify the kind of request: Software (coding) or Documentation. A Dependent Picklist could then be used to set up a different set choices for each kind of request: | ||
:{| border="1" cellpadding="3" | :{| border="1" cellpadding="3" | ||
Line 11: | Line 11: | ||
| '''Software''' | | '''Software''' | ||
| | | | ||
* Bug | * Bug Report | ||
* Feature Request | * Feature Request | ||
|- | |- | ||
| '''Documentation''' | | '''Documentation''' | ||
| | | | ||
* Bug | * Bug Report | ||
* New Feature Writeup | * New Feature Writeup | ||
* Documentation Enhancement<br>(for a new document, for example, or an improvement) | * Documentation Enhancement<br>(for a new document, for example, or an improvement) | ||
Line 23: | Line 23: | ||
:''Learn more:'' [[Enumerated Fields]] | :''Learn more:'' [[Enumerated Fields]] | ||
;Considerations: | |||
:*A field cannot be deleted if it is the triggering value for a dependent field. | |||
:*If the triggering field for a dependent field is changed, a message appears telling you that data will be lost if the change is executed. Confirmation is required to proceed. | |||
===Adding a Dependent Picklist=== | ===Adding a Dependent Picklist=== | ||
This is a | This is a four-step process: | ||
:* | :* Create the triggering field (also known as the ''parent'' field). | ||
:* | :* Create the dependent picklist. | ||
:* Specify the complete collection of options that will be available. | |||
:* For each possible triggering choice, specify which of the available options appear in the dependent picklist. | |||
'''To add a dependent picklist:''' | '''To add a dependent picklist:''' | ||
#Create a triggering field and add values to it | # Create a triggering field with one of the following types, and add values to it: | ||
#* [[Radio Buttons]] | #* [[Radio Buttons]] | ||
#* [[Picklist]]s | #* [[Picklist]]s | ||
Line 44: | Line 50: | ||
#: | #: | ||
#:;Maximum Storage Length: | #:;Maximum Storage Length: | ||
#:: | #::Specify a number of characters that is equal to or greater than the size of the longest value-string that can be selected. Otherwise, a [[Data Truncation Error]] may occur at runtime. | ||
#: | #: | ||
#:;Show First Value as Default: | #:;Show First Value as Default: | ||
Line 51: | Line 57: | ||
#:;Sort List Alphabetically: | #:;Sort List Alphabetically: | ||
#::This setting causes the values in presented list to be sorted alphabetically. Otherwise, they are displayed in the order defined in the ''Manage Values'' section. | #::This setting causes the values in presented list to be sorted alphabetically. Otherwise, they are displayed in the order defined in the ''Manage Values'' section. | ||
#:::'''Tip:''' | |||
#:::It is the ''values'' that are sorted, not the display labels. A common practice is to add numbers to the values so the entries display in the order you want them. | |||
#: | #: | ||
#:(The remaining attributes are standard [[Field]] properties.) | #:(The remaining attributes are standard [[Field]] properties.) | ||
#: | #: | ||
#Click '''[Save]'''<br>A new | #Click '''[Save]'''<br>A new section appears: ''Enumerated Values''. | ||
#: | #: | ||
# | #In the new section, click '''[Manage Values]''' | ||
# Specify the entire collection of possible values.<br>In the example given above, the list would consist of: | # Specify the entire collection of possible values.<br>In the example given above, the list would consist of: | ||
#* Bug | #:* Bug Report | ||
#* New Feature Request | #:* New Feature Request | ||
#* New Feature Writeup | #:* New Feature Writeup | ||
#* Documentation Enhancement | #:* Documentation Enhancement | ||
#: | |||
#Click '''[Save]'''<br>A new section appears: ''Dependent Picklist Assiciations''. | |||
#: | |||
#In the new section, click '''[Add Associations]''' | |||
#: | #: | ||
#In the | # In the '''Parent Values''' field, select one of the triggering values.<br>Two list boxes appear. | ||
# | #: '''Note:''' Field ''values'' are shown, not their display labels.<br> | ||
# | # Move items from the '''Available Items''' list to the '''Selected Items''' list.<br>Selected items appear as options in the dependent picklist, for that particular triggering value. | ||
#Click '''[Save]''' | |||
# Repeat the last few steps to add additional associations for each of the possible triggering values.<br>''Learn more:'' [[Enumerated Fields#Manage and Reorder Values]] | |||
Latest revision as of 23:31, 2 May 2014
A Dependent Picklist provides a list of choices, where the available options are determined by some other value.
About Dependent Picklists
A Dependent Picklist can be based on a set of Radio Buttons or a standard Picklist. The value of that field is the triggering value. When that value is present in the record, or when the user selects a value in that GUI, the value determines which options are present in the Dependent Picklist.
For example, suppose you have a request management system for a software application. In that application, you might set up radio buttons to specify the kind of request: Software (coding) or Documentation. A Dependent Picklist could then be used to set up a different set choices for each kind of request:
Kind of Request Request Type Software - Bug Report
- Feature Request
Documentation - Bug Report
- New Feature Writeup
- Documentation Enhancement
(for a new document, for example, or an improvement)
A single Request Type field can then be used for each kind of request, with an appropriate set of choices for each kind.
- Learn more: Enumerated Fields
- Considerations
-
- A field cannot be deleted if it is the triggering value for a dependent field.
- If the triggering field for a dependent field is changed, a message appears telling you that data will be lost if the change is executed. Confirmation is required to proceed.
Adding a Dependent Picklist
This is a four-step process:
- Create the triggering field (also known as the parent field).
- Create the dependent picklist.
- Specify the complete collection of options that will be available.
- For each possible triggering choice, specify which of the available options appear in the dependent picklist.
To add a dependent picklist:
- Create a triggering field with one of the following types, and add values to it:
- Create a new field of type Dependent Picklist
- Fill in the basic field settings:
- Label
- The field label that will be displayed
- Display Type
- Dependent Picklist
- Parent Field
-
- Select the "parent" field (the triggering field)
- Enter the picklist values
-
- Maximum Storage Length
- Specify a number of characters that is equal to or greater than the size of the longest value-string that can be selected. Otherwise, a Data Truncation Error may occur at runtime.
-
- Show First Value as Default
- This setting causes the first value in the presented list of values to be the default. Otherwise, there is no default.
-
- Sort List Alphabetically
- This setting causes the values in presented list to be sorted alphabetically. Otherwise, they are displayed in the order defined in the Manage Values section.
- Tip:
- It is the values that are sorted, not the display labels. A common practice is to add numbers to the values so the entries display in the order you want them.
- (The remaining attributes are standard Field properties.)
- Click [Save]
A new section appears: Enumerated Values. - In the new section, click [Manage Values]
- Specify the entire collection of possible values.
In the example given above, the list would consist of:- Bug Report
- New Feature Request
- New Feature Writeup
- Documentation Enhancement
- Click [Save]
A new section appears: Dependent Picklist Assiciations. - In the new section, click [Add Associations]
- In the Parent Values field, select one of the triggering values.
Two list boxes appear.- Note: Field values are shown, not their display labels.
- Note: Field values are shown, not their display labels.
- Move items from the Available Items list to the Selected Items list.
Selected items appear as options in the dependent picklist, for that particular triggering value. - Click [Save]
- Repeat the last few steps to add additional associations for each of the possible triggering values.
Learn more: Enumerated Fields#Manage and Reorder Values