Servicely Configuration
Choices & Choice Lists
17 min
summary within the platform, one of the field types that can be created is a choice field these fields assist in allowing users to select from a per defined list of values, without referring to a specific table these labels can be localised, can be scripted and can use the same group of choices across multiple entities and fields how choices are stored although choices are not stored within bespoke entities, they are stored in a specific table we do not have to interact with it directly (as in most situations you can simply do it via the field definition) for more advance usages of choices however, it is important to understand how they are stored and how they can be manipulated directly if required available value the available value table stores the the key and label combination that make up the content of a choice list when you are configuring a field definition for a choice field, these are the records that are created, updated and deleted based on what you do from the field specific settings tab field type example notes / description table reference incident this is the table where the available value will appear as a choice field reference impact this is the field (on the configured table above), where the available value will appear as a choice key string 1 this is the key of a choice that is used when getting the value of a choice field when scripting or otherwise, this is what needs to be used when setting values or querying values this does not support special characters outside of underscores ( ), so it is often recommend to make your keys alphanumeric with spaces being replaced with underscores it does not need to match the label label localised text p1 | critical this is what people will see when selecting a choice from a choice field these are localised text values, so in situations where multi language is required, these label can be different per language this is the display value of each choice group string itsmworkpriority the group field is used to group certain values together this is the field that is referenced within the table available field values table, to tie various values to a field and table combination this separation of entities, is what allows you to use the same group of available values within multiple field and table combinations icon icon selection forward to inbox this allows you to select from a list of icons in the system that you want a specific choice value has styles multi reference to named styles status dot, status dot red this allows you to select any named styles you have defined or out the box that you want to have for individual choice options css string ns status dot amber this is a reference to a css style that is defined either in the system or style sheet this can be used to add a style to individual choice options active boolean true this determines if a choice can be selected from a choice field often when choice values are no longer needed, they are kept (not deleted), but made inactive to ensure data integrity order integer 100 this determines what order the choices of the same group are displayed as the ordering essentially goes from the lowest to highest choices, however what the numbers are does not matter if you had 1 available value with an order of 1 and another with 2, this would display the same as if the value had the order of 1 had an order of 100 and the other value had an order of 2500 value type choice standard choices are standard group you can group choices together with the purpose of re using them across multiple choice fields to do that, set the value type to be “group” group string itsmworkpriority the group field is used to group certain values together with this is the field that is referenced within the table available field values table, to tie various values to a field and table combination this separation of entities, is what allows you to use the same group of available values within multiple field and table combinations qualifier string this is an optional field which is used to display/hide a choice dependant on another field’s value e g if a choice field selection is to drive another choice field’s available options method of choice creation and modification when you create a choice field, there are a few different ways that the choices within that field can be populated each of them have their purposes and have their benefits however often the basic usage is required no matter what method you use, you can switch them depending when / if your requirements change it should be noted that this is a system administrator task and these values cannot be modified by non administrator users on field creation when creating a choice field, it allows you to select from an existing value group, or creating your own version 1 10 after selecting a field type of “choice”, you will be presented with the “available values” section where you can configure the choices for the choice field you can add / remove / reorder your choices as required image 20250305 021339 png you can enable the advanced mode by checking the checkbox that will also show the order number and the key image 20250305 042108 png before version 1 10 after selecting a field type of “choice”, you will be presented with the “available values” section where you can configure the choices for the choice field filling in the choice label will auto populate the choice key, but you will need to provide the order number for the choice/available value entry once you added a choice to the list, it will show up in the box on the bottom half, below the add/update button image 20250305 021734 png after field creation if you want to modify these choices after creating a field, this can be done by going to the form where the choice field is and right clicking the field and following the steps below it should be noted that this will look up the available values of standard type that is configured for the table field using this method means you do not need to interact with the available value table directly and allows you to maintain simply choice lists within a few clicks version 1 10 right click on field label and left click on “edit available values” image 20250305 033429 png you will see a pop up screen with the currently configured available values you can then add/reorder/update/remove the choices as required example below image 20250305 033531 png to update, select an existing choice, and then update the choice label, while to change the order, you can also drag the configured options up and down before version 1 10 right click on field label and left click on the “show definition” menu item you can then add/reorder/update/remove the choices as required example below image 20250305 033129 png to update/change order, select an existing choice, and then update the choice label and/or the order same group, different field in situations where you have a select of available values you want to use for multiple fields that can be across different entities, this is done by modifying the field’s properties for example below, is for out of box field “externalsource” on the cmdb table where it is making use of available value options with group name of “cmdbexternalsourcegroup” the properties are available value group cmdbexternalsourcegroup available value type group image 20250305 032237 png different choices per table for the same field in situations where you have a field on a base table, but then want different choices on an extended table, such as a priority field on incident, where as the field exists on the itsmwork level, you can do this by creating new available value directly on the field definition first go to the field on the form, e g priority on incident, right click on the field label to show the field definition and then go to the “field specific settings” tab if the field’s available value has been configured in the parent table or higher in the hierarchy, the tab will present like below where it gives you the option to create new choices for the lower level table image 20250305 034037 png usage choice field dependant of another field a choice field can be configured to be dependent on another field like a choice field or a reference field to configure the dependency, please follow the following steps note that we are using an example if there are two choice fields called “business area” and “type” where what you choose as type, drives what is available to be selected on the “business area” choice field add a field property to the choice field you want to be dependent on the other field dependent on field name that the choice field is dependent on image 20250305 040028 png go to the form layout configuration and click on the configure icon on the same choice field that you want to be dependent on the other field you will be presented with the settings for that field on that particular form layout you need to set the below, under the “advanced options” section field value type dependant field dependant fields field name that the choice field is dependent on dependant field action recalculate available field values image 20250305 035558 png image 20250305 035528 png then, on each the choice field’s available value record, populate the qualifier field with the value of the other field (that the choice field is dependent on), that will result in the choice field’s available value showing continuing with our example, if we only want to show business area option called “area 51” when type “issue” is selected, but “area 1” when type “request” is selected image 20250305 041545 png image 20250305 041557 png then, you would want to update the qualifier for the “area 51” and “area 1” available value records to point to the “type” values that you want example below shows the “area 51” available value to show the behaviour as shown in screenshot above note that what you put in the qualifier field needs to be the actual value, not the label so, being dependant on another choice field, you will need to put in the dependant choice field’s key in this example, the label is “issue”, but the key is “issue” if your field is dependent on a reference field, then what you need to put into the qualifier field needs to be the id of the referenced record image 20250305 041007 png