The Enum Values property can be set for any domain defined. It opens a dialog to enumerate the possible values that an attribute or variable based on this domain can take.
For each possible value you must specify a Name, to be used to make reference to the value at programming time, and a Description, which will be shown as a possible value to be selected for an attribute/value based on this domain. By default, the attribute/variable controls belonging to an enumerated domain are shown as a combo, with the Description values.
All the attributes/variables whose definition is based on an enumerated domain acquire these domain characteristics automatically.
It is not possible to assign a value to an enumerated variable or attribute directly:
&var = value
Continuing with our example, this syntax is wrong and a “type mismatch” error will be shown in the navigation:
&var = "M"
The correct assignation must be done through the value name:
&var = Domain.Name
In our example, the syntax should be:
&var = Gender.Female
&var = Gender.Male
If Name does not exist among the defined names, an error will occur at runtime.The valid characters to define the Name are the same as for attribute names; i.e.: only letters, numbers and underscore (_) are valid, and always starting with a letter.
In some cases you need to store a Null value and/or let the user to select a value that isn't part of the domain. In that case you don't need to add the Null or Empty value to the Domain. Just set the EmptyItem property to True and Empty as null property to Yes.
In Boolean domains, the default value for properties Checked value and Unchecked value will be taken depending on the order of the Enum Values defined (it will take the second value defined to set the Checked value property).
Default value for properties will be:
Checked value = false
Unchecked value = true
Enumerated Domains Methods and Properties