Skip to main content
Version: 2.9

Enums

An enum is an ordered list of entries, with a Value and a Display Name. The Value is the actual value being used within dataflows, while the Display Name is the text displayed in DRAW. Enums are treated as types within Olympe.

Let's have an example of an enum called "Currencies":

enum Currencies
{
EUR,
USD,
CHF
}

Create an Enum Folder

Create one by drag-and-dropping the Enum component from the Marketplace on the right side of the screen into the main editor.

add_enums

add_enums

Define the enums

After creating the enum, you can populate its values.

Each entry in an enum has a value, which is an internal value used by the enum and a display name, which can be a different text to be displayed to users. Reusing our list of currencies above, the value USD could have US Dollar as display name, and CHF have Swiss Franc. The ordering of the values can also be changed using the up/down arrows.

value

Using an enum

Enums are seen as new types within DRAW. They can therefore be used wherever types are used:

Reusing an enum in another project

In case the current project is imported by other projects, you may want to set the visibility of the enum to public. By doing so, the enum will be visible within the importing projects.