Enumerations in Expressions
1 Introduction
Enumerations are referenced by <modulename>.<enumerationname>.<enumerationvalue>
.
For example, you have a module called OrderProcessing, in which an enumeration Status is defined with two possible values: started and completed.
To set the value of an attribute in a change list, object, or variable activity to completed, use the following input:
|
|
Conditional statements are also possible:
|
|
You can also use conditional statements to check whether two emuneration values are the same:
|
|
2 getCaption
The getCaption
function takes an enumeration value and returns the caption of this value. The caption is a translatable string and the result of this function depends on the current language.
2.1 Input Parameters
As an input parameter you can use an enumeration value of any enumeration.
2.2 Output
The output is described in the table below:
Value | Type |
---|---|
The caption of the enumeration value in the current language. | String |
2.3 Example
If you use the following input:
|
|
The output can be:
|
|
3 getKey
The getKey
function takes an enumeration value and returns the key (called Name in Studio Pro) of this value. The key is the technical name for the enumeration value and is language independent. For more information, see Enumerations.
3.1 Input Parameters
As an input parameter you can use an enumeration value of any enumeration.
3.2 Output
The output is described in the table below:
Value | Type |
---|---|
The key (name) of the enumeration value in the current language. | String |
3.3 Example
If you use the following input:
|
|
The output can be:
|
|
4 Read More
Feedback
Was this page helpful?
Glad to hear it! Thank you for your response.
Sorry to hear that. Please tell us how we can improve.