Enumerations

You edit enumerations by right-clicking on any model element in the "model content" window.

Edit enumerations menu.png

The enumeration editing window

Defining enumerations.png

The defined enumeration is a class in the model's typesystem.

For example, you can returning a list of the values. This return a collection of ImportColumn Tuples

ImportColumn.allInstances

Converting this to a list of strings for each Enum value (for example to be used in a list on screen)

ImportColumn.allInstances.asString

Select an enum value from the list, then getting the string value from that

ImportColumn.allInstances->select(ic|ic = #JournalName).asString

Getting the value of an Enum tuple

(#JournalName).toString

(note: asString don't work on enum tuples)

This page was edited 8 days ago on 06/17/2024. What links here