Scripts of type Dependent enum
Dependent enums are hierarchical data structures. In contrast to hierarchical lists (see Hierarchical lists), the values of each level are calculated based on the value selected on the parent level. Therefore, instead of displaying all the values which belong to a given list, it is possible to display only a subset of the available list values. In addition, it is possible to have empty levels within a dependent enum. Dependent enums can be used in case, contact and resource data models.
In the Web Client, the selected value on each level is displayed.
Steps to use a dependent enum script:
- Create the required lists in the Enumerated lists section of the Web Admin Suite.
- Write a script of the type Dependent enum in the Scripts section of the Web Admin Suite.
- Assign the script to the desired data field group in the Admin Tool. A data field group can have several dependent enum scripts.
Coding example
The following example shows a dependent enum used to manage countries. Three lists are used in the example: Continent, Subcontinent and Country. On the first level, the user selects the continent. Depending on the selection, the user can either select a subcontinent on the second level, or directly select a country on the third level.
Figure 16: ConSol CM Web Client - Sub-list of continent America
Figure 17: ConSol CM Web Client - Sub-list of continent Europe