Managing Sorted Lists: Enums
Introduction
Enums, also called sorted lists, are lists with predefined list values. You define an enum in the navigation item Enums from the navigation group Tickets. Enums are defined once and can be used in several places:
- as a selection list (in drop-down menus) for ticket fields, customer fields, or resource fields of type enum
- as hierarchical lists for ticket fields, customer fields, or resource fields of type MLA field (Multi Level Attributes, see section MLAs)
- as dependent enums, i.e., as enums that form a hierarchy, a data construct implemented by Scripts of Type Dependent Enum
You only define the lists, i.e., the structures with various list values, in the enum administration. To display the enum in the Web Client (as ticket field values, customer field values, or resource field values), you have to complete one of the following steps:
- Create a ticket field of type enum and assign the respective enum there.
- Create a customer field of type enum and assign the respective enum there.
- Create a resource field of type enum and assign the respective enum there.
- Create an MLA which is linked automatically as ticket field to the ticket field group, as customer field to the customer field group, or as resource field to the resource field group that has been indicated during MLA set-up.
- Create a dependent enum script and assign it to a ticket field group, customer field group, or resource field group.
Examples:
A list of country names (Germany, Italy, France, etc.) is used in the customer field Country belonging to an address data set. The same list can also be used in the ticket field Machine location and in other data fields. Priority lists (high, normal, low, etc.) are other typical examples.
Depending on the value of the enum-type annotation, an enum field is displayed in the Web Client as follows:
- drop-down menu
enum-type not set or enum-type = select - radio buttons
enum-type = radio - self-completing (autocomplete) list
enum-type = autocomplete
If the annotation enum-type is not set, a drop-down menu is displayed by default (see example in the picture below).
Figure 48: ConSol CM Web Client - Enum for Priority (localized enum values displayed as list items)
Enum Administration Using the Admin Tool
The following figure shows the available sorted lists. You reach this screen by opening the navigation item Enums in the navigation group Lists.
Figure 49: ConSol CM Admin Tool - Lists, Enums
Enums are organized in three levels:
- Type (1)
The type helps to organize your lists within the Admin Tool. Its name is never displayed in the Web Client and does not have any other implications. - Group (2)
The group represents a group of enum values, i.e., the list. - Value (3)
The value represents one value within a list. You can pick a color for each value (4), which will be used as a background color for the ticket icon in the defined queue. You can use the up and down arrows to determine the value's position within the list in the Web Client.
Enum Types
Create an Enum Type
To create a new enum type just click the Add button below the list in the Type area on the left of the window. The following pop-up window appears.
Figure 50: ConSol CM Admin Tool - Lists, Enums: Creating an enum type
- Name:
Enter a name for the new enum type. The name must be unique. - Localized values:
Enter the corresponding type name in the Value field for each additional language. For details, please refer to the section Localization of Objects in General, Type 2.
Click OK to create the enum type and to close the window.
Edit an Enum Type
If you want to edit an enum type, select it in the list and click the Edit button. The same window as described above for creating an enum type will appear. You can modify all fields and save your changes by clicking OK.
Delete an Enum Type
An enum type can only be deleted if there are no enum groups for it anymore. Either you have to delete all groups belonging to this type first or you have to assign them to another type. In order to delete an enum type, select it in the list and click the Delete button. If you confirm the following dialog with Yes, the type will be removed from the list and the system.
Enable or Disable an Enum Type
If you do not want to delete an enum type because you might need it again, you can disable it. To do so select the type and click the Deactivate button. The entry in the list is shown in italics afterwards. Just click the Activate button below the type list, if you want to enable the type again.
If you disable an enum type, it cannot be selected for data fields of the type enum anymore. You can only disable enum types which are not in use, i.e., if the enum type is used in a data field, you have to disable the field before disabling the enum type.
Enum Groups
Create an Enum Group
An enum group represents a list, i.e., the enum group is a collection of list (enum) values. All groups of an enum type (i.e., all lists which belong to this type) are created and managed in the middle part of the Enum Administration window. To create a new enum group select the desired type on the left, then click the Add button below the Group area. The following pop-up window appears.
Figure 51: ConSol CM Admin Tool - Lists, Enums: Creating an enum group
- Name:
Enter a name for the enum group. The name must be unique. - Type:
This field shows the selected enum type for the group. You can also choose any other type from the selection list, e.g., if you want to assign the group to a different type. - Order by:
Here you can define the way the values of a group shall be ordered:- user-defined
You can specify the sort order by means of arrow icons below the value list. - name
The values will be ordered alphabetically.
- user-defined
- Template Enabled:
When this value is set to true (checkbox ticked), the enum is offered as enum parameter in the Text Template Manager. This is the only module where this value is relevant. If you do not know what to do with the checkbox, leave it empty. Please see section The ConSol CM Text Template Manager, String and Enum Parameters. - Localized values:
Enter the corresponding group name in the Value field for each additional language. For details, please refer to the section Localization of Objects in General, Type 2.
Click OK to create the enum group and to close the window.
Edit an Enum Group
If you want to edit an enum group, select it in the list and click the Edit button. The same window as described above for creating an enum group will appear. You can modify all fields and save your changes by clicking OK.
Delete an Enum Group
An enum group can only be deleted if it is not used in a ticket or an MLA. In order to delete a group, select it in the list and click the Delete button. If you confirm the following dialog with Yes, the group will be removed from the list and the system.
Enable or Disable an Enum Group
An enum group cannot be disabled if it is still used in an MLA.
If you cannot delete an enum group or if you do not want to delete it, because you might need it again, you can disable it. To do so select the group and click the Deactivate button. The entry in the list is shown in italics afterwards. Just click the Activate button below the group list, if you want to enable the group again.
If you disable an enum group, it cannot be selected for data fields of the type enum anymore. You can only disable enum groups which are not in use, i.e., if the enum group is used in a data field, you have to disable the field before disabling the enum group.
Enum Values
Create an Enum Value
The individual values of an enum group (i.e., the list values) are created in the right part of the window. Select the desired group and click the Add button below the Value area. The following pop-up window appears.
Figure 52: ConSol CM Admin Tool - Lists, Enums: Creating an enum value
- Name:
Enter a value which will be displayed in the sorted list on the Web Client. - Localized values:
Enter the corresponding value name in the Value field for each available language. For details, please refer to the section Localization of Objects in General, Type 2.
Click Save and next if you want to continue to create values for this enum group. To finish the creation of the list click OK.
Edit an Enum Value
If you want to edit an enum value, select it in the list and click the Edit button. A pop-up window will appear where you can modify the name and the localized values. Click OK to save your changes.
Set a Background Color
You can assign a color to a selected enum value by clicking the Color button. This can be used, for example, for priorities. The priority of a ticket in the Web Client can be recognized immediately by the background color of the ticket icon. This will be effective when the respective annotation is set, see the following info box.
Please note that only one enum can determine the color of the ticket icon for a queue. You have to assign the annotation enum field with ticket color to the respective ticket field of type enum in the Ticket Fields (Setting Up the Ticket Data Model). For example, you can use the ticket field priority to determine the ticket icon color in the helpdesk queue and the ticket field (enum) likelihood of closing a deal in the sales queue.
The pop-up window contains a range of colors from which you can choose the desired background color. Click the desired color to set it for the marked list value. You can check the selected color in the Preview area. Click OK to save your choice. Click Reset if you want to restore the last saved color.
Figure 53: ConSol CM Admin Tool - Lists, Enums: Setting a background color for an enum value
Delete an Enum Value
An enum value can only be deleted if it is not used in an MLA. To delete a value, select it in the list and click the Delete button. If you confirm the following dialog with Yes, the value will be removed from the list and the system.
Before you delete an enum value, make sure there are no references to it in workflow scripts! This is not checked in the Admin Tool!
Change the Order of the Value List
If you have chosen user-defined in the Order by field of an enum group, you can arrange the enum values by using the arrow icons below the list. Click the Move upwards button to move the selected value one line up resp. click the Move downwards button to move it one line down. If you change the value for Order by from user-defined to name, the enum values will automatically be ordered by name in alphabetical order.
Enable or Disable an Enum Value
An enum value cannot be disabled if it is still used in an MLA.
If you do not want to delete an enum value because you might need it again, you can disable it. To do so, select the value and click the Deactivate button. The entry in the list is shown in italics afterwards and the value is not available in the Web Client any longer. Just click the Activate button below the value list if you want to enable the value again.
Placing an Enum in the Data Model
Enums can be used in ticket fields (i.e. for ticket data), customer fields (i.e. for customer data) and resource fields (i.e. for resource data). The example below shows an enum for ticket data.
Enums for Ticket Data
In order to place an enum in the ticket data model, i.e., to make it available in queues and visible in the Web Client, a ticket field of type enum has to be defined. Select enum as a data type (1) and select the enum type and group which the enum belongs to (2). Please see section Ticket Fields (Setting Up the Ticket Data Model) for a detailed explanation of the work with ticket fields.
Enums for Customer Data
In order to place an enum in the customer data model, i.e., to make it available for company or contact data in the Web Client, a customer field of type enum has to be defined. Select enum as a data type (1) and select the enum type and group which the enum belongs to (2). Please see section Customer Field Management and GUI Design for Customer Data for a detailed explanation of the work with customer fields.
Enums for Resource Data
In order to place an enum in the resource data model, i.e., to make it available in resources in the Web Client, a resource field of type enum has to be defined. Select enum as a data type (1) and select the enum type and group which the enum belongs to (2). Please see section CM/Resource Pool - Setting Up the Basic Resource Model for a detailed explanation of the work with resource fields.
Figure 54: ConSol CM Admin Tool - Tickets, Ticket Fields: Defining a ticket field of type enum