Difference between revisions of "Dependent Picklist"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Β 
(40 intermediate revisions by the same user not shown)
Line 1: Line 1:
A Dependent Picklist provides the ability to define (or filter) a group of choices, based on a some other value. Β 
A ''Dependent Picklist'' provides a list of choices, where the available options are determined by some other value. Β 


===About Dependent Picklists===
===About Dependent Picklists===
These field display types can be used to build 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.
:* Radio Buttons
:* [[Picklist]]s


For example, in manufacturing, a computer might be created from a few ''Sub Assembly'' items, each made up of available component parts. The ''Component Parts'' might be enumerated, based on inventory level, for example.
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:


:;Example:
:{| border="1" cellpadding="3"
::{| border="1" cellpadding="5" cellspacing="0"
! Kind of Request !! Request Type
|-
|-
!Field Name
| '''Software'''
!Field Display Type
|
!Available Values
* Bug Report
* Feature Request
|-
|-
|''Sub Assembly''
| '''Documentation'''
|width="250"|Picklist
|width="180"|
External Case Assembly / Circuit Board Kit / Data Storage Devices / Ports and cables
|-
|''Component Parts'' ||Dependent Picklist (select ''Sub Assembly'' as Dependent Field)
|
|
ST-2342Β  / ST-99843 / ST-3209 / ST-0094 / FR-23432 / FR-6530 / FR-9093 / RF-234 / RF-235 / RF-237 / GTT-34534 / GTT-0779 / GTT-300567 / GTT-300595 / GTT-300827 / GTT-300857
* Bug Report
* New Feature Writeup
* Documentation Enhancement<br>(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.


:The resulting ''Child Values'' are created based on associations created between ''Component Parts'' and the ''Sub Assembly'' Parent Value.
:''Learn more:'' [[Enumerated Fields]]


;Considerations:
;Considerations:
:* It is not possible to specify default values for a dependent picklist. (A separate default would be needed for each parent value.)
:*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===
For each Dependent Picklist, a "parent" field is selected, which defines the top-level field in the dependency hierarchy. Additional values ("child" fields) are defined within the dependent picklist. The resulting dependent picklist is created by associating "child" field(s) with each "parent" field.
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.


This is a two-step process; first, create the "parent" field, then create the Dependent Picklist (the "child" field).
'''To add a dependent picklist:'''
Β 
# Create a triggering field with one of the following types, and add values to it:
#Using the instructions in [[Fields]], create a new field of any of the following types, add picklist values and save the field (this will be used as the parent field):
#* [[Radio Buttons]]
#*Radio Buttons
#* [[Picklist]]s
#*[[Picklist]]s
#:
#Using the instructions in [[Fields]], create a new field of type: Dependent Picklist, and enter the following information:
#Create a new field of type ''Dependent Picklist''
#:
#Fill in the basic field settings:
#:;Label:The field label that will be displayed
#:;Label:The field label that will be displayed
#:;Display Type:Dependent Picklist
#:;Display Type:Dependent Picklist
#:;Parent Field:
#:;Parent Field:
#::*Select the "parent" field (created in the previous step)
#::*Select the "parent" field (the triggering field)
#::*Enter the picklist values
#::*Enter the picklist values
#:Optionally, modify any of the remaining sections, using the instructions in [[Fields]]
#Click '''[Save]'''
#:
#:
#In the Enumerated Values section, click '''[Manage Values]''' to specify the collection of all possible 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]'''<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:
#:* Bug Report
#:* New Feature Request
#:* New Feature Writeup
#:* Documentation Enhancement
#:
#Click '''[Save]'''<br>A new section appears: ''Dependent Picklist Assiciations''.
#:
#In the new section, click '''[Add Associations]'''
#:
#:
#In the Dependent Picklist Associations section (at the bottom):
# In the '''Parent Values''' field, select one of the triggering values.<br>Two list boxes appear.
#* Click the '''[Add Associations]''' button.
#: '''Note:''' Field ''values'' are shown, not their display labels.<br>
#* Choose the Dependent Picklist Values to be associated with each Parent Value.
# 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]'''
===Using a Dependent Picklist===
# 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]]
Β 
;Considerations:
:*After a dependent field association is created, the ''Use Label for grouping'' option cannot be enabled for any of the parent or dependent field values
:*A field cannot be deleted if it is a "parent" for a dependent field
:*If the "parent" field of a dependent field is changed, a confirmation message appears, requesting the user to acknowledge that data will be lost if the change is executed
:*Dependent picklist values cannot be reordered
:*It is not possible to specify a default value for a dependent picklist.
<noinclude>
:''Learn more:'' [[Enumerated Fields]]
</noinclude>

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:

  1. Create a triggering field with one of the following types, and add values to it:
  2. Create a new field of type Dependent Picklist
  3. 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.)
  4. Click [Save]
    A new section appears: Enumerated Values.
  5. In the new section, click [Manage Values]
  6. 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
  7. Click [Save]
    A new section appears: Dependent Picklist Assiciations.
  8. In the new section, click [Add Associations]
  9. In the Parent Values field, select one of the triggering values.
    Two list boxes appear.
    Note: Field values are shown, not their display labels.
  10. 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.
  11. Click [Save]
  12. Repeat the last few steps to add additional associations for each of the possible triggering values.
    Learn more: Enumerated Fields#Manage and Reorder Values