Hierarchical Picklists Unveiled
By @lex on Nov 30, 2008
once and for all
Hierarchical picklists in Siebel CRM... It's a long story. There are numerous approaches (even in the standard repository) and myths out there how to implement them. A hierarchical picklist is one that allows a user to pick a value for the first field and then shows only values for the second field that are dependent on the first one and so on.
Here is a cookbook style example (tested on Siebel Industry Applications 8.1) how to implement a hierarchical picklist with indefinite levels:
1. Create the list of values data
Use the Siebel Web Client to enter the data for the picklist. You should use the same TYPE and distinguish the levels using the Parent field.
2. Create the business component fields
Create one field for each level. For all levels but the lowest set the property Immediate Post Changes to true (for resetting the lower fields when changing the value in the applet).
Use the Picklist wizard to create a static bounded picklist object for the new fields. Create separate picklist objects for the first level and all subsequent levels (you will use 2 different picklist objects). When the wizard is finished, navigate to the picklists and make the following changes manually:
For the first level picklist, change the Business Component property to PickList Hierarchical and set the Search Specification property to [Parent Id] IS NULL.
For the second (and subsequent) level picklist, change the Business Component Property to PickList Hierarchical.
4. Edit pick maps
Navigate to the Pick Map specifications for the new fields and set the following:
For the first level field add pick map records for all dependent fields and enter Dummy as the picklist field. Dummy is a calculated field (evaluating to an empty string) in the PickList Hierarchical BC.
For the subsequent fields add the Dummy mapping for all remaining dependent fields and add an additional record for the upper level field where you set the Picklist Field to Value and the Constrain flag to true.
Do not add a dummy mapping for the last field in the hierarchy. The screenshot should give you the general idea:
Do the UI work as usual and test.
The dropdown for field 1 should only display the highest level values and lower level fields should be constrained to the child values of the higher level field value. When changing an upper level field, the lower level fields should be reset to empty strings. Users should not be able to select values in "wrong order".
have a nice day