Page History
Info | ||||
---|---|---|---|---|
| ||||
|
What is it?
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.
What does it do?
It offers the user a list of values the user can choose from.
Properties
Property | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Base type | Should match with the data type of the attribute the value list is linked with. The options are: Boolean, String, Number, Date, DateTime, Percentage, Currency and Integer. See also Attribute types. | |||||||||
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.
| |||||||||
Presentation styles | Select one or more presentation styles. Presentation styles in a value list can for example be used to apply icons such as different country flags. |
How to – create a conditional value list
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.
Create a new value list
Add at lease one item in the Items tab
Select the Conditions tab
Toggle the Conditional toggle. A table appears (like a decision table) summing up the values you just created on the Items tab.
Define in the table:
Which conditions apply to the value list
Which value is shown when the condition is true by ticking the checkboxes
...
Tip |
---|
Use the "Show display values" toggle to show the display values instead of technical values of value list items in the table. |
Info | ||||
---|---|---|---|---|
| ||||
If your user can change the available values (the outcome of the decision table), but already selected a value that is no longer available, the selected value will remain selected. This value will only disappear after the user changes their selection. If the now unavailable value shouldn't be possible to select, consider adding a validation rule. |
How to – work with an external value list
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 Encore 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 studioEncore, so that you can validate on them in expressions, and use these values in drop downs. These values defined values defined in studio are Encore are not exported to the runtime, and the runtime completely bases the values from the list on the external source.