A value list is used for predefining possible values that an Attribute can have and it's corresponding display values. |
A value list, sometimes misspelled as valuelist, limits the base Types of an Attribute. It contains a set of possible values an attribute can have. After the value list is specified it can be chosen within the attribute. When you attempt to set a value that is not in the value list, a run-time exception is thrown. However, it is possible to keep deprecated values in a value list, by using a conditional value list, and setting a False condition for those values.
It offers the user a list of values they can choose from.
Property | Description | ||
---|---|---|---|
Name | Identifies the object. Maximum 100 characters (only letters, numbers and underscores (_)) are allowed. | ||
Description | Optional, a short description of the purpose/content of the validation list | ||
Base type | Choose type. The options are: Boolean, String, Number, Date, DateTime, Percentage, Currency and Integer (also see Attribute type). | ||
External | Tick this box if you want to use an external source for the value list items. (An external value list does not have fixed values, but gets its values from an external source, e.g., a data base or a service. How the value list gets its data is configured in the configuration of Interactions. It requires Java code to supply the values.) | ||
Items - value | A value that matches the value lists base type. This value can be used in expressions | ||
Items - display value | A text that describes the matching value. This text is used in your applications user interface. The display value is multilingual
|
A conditional value list means that under a certain condition only a subset of all possible values is available. When you use a conditional value list, the subset of available values is determined at run-time.
To create a conditional value list you need at least one value.
An external value list means that the list is filled with values by an external source, i.e., a piece of code that supplies the values. As studio does not connect during design time to this external source, you cannot use the values for validating expressions or using drop downs. If you are sure that some values are present in this external source, you can define them in studio, so that you can validate on them in expressions, and use these values in drop downs. These values defined in studio are not exported to the runtime, and the runtime completely bases the values from the list on the external source.
In the example below, we are sure that the external list holds values 'S', 'M' and 'L', but other values such as 'XL' can be present in the external source.