An enumeration defines a fixed set of named values for an attribute. When an attribute’s type is declared as Enumeration(<Name>), Aurena renders it as a dropdown list, and the projection ensures only valid values can be saved.
Enumerations are defined in the projection file (or fragment) and then referenced by attribute declarations throughout that projection. Each value in the enumeration has:
A value — the human-readable string stored in the database
An identifier — the PascalCase name used in code (conditions, comparisons)
A label — the text shown in the Aurena UI (usually same as value)
------------------------------- ENUMERATIONS --------------------------------enumeration BalanceStatusEnum { value = "Not Balanced" { identifier = "NotBalanced"; -- used in client conditions: [Status = "NotBalanced"] label = "Not Balanced"; -- shown in Aurena dropdown } value = "Partially Balanced" { identifier = "PartiallyBalanced"; label = "Partially Balanced"; } value = "Over Balanced" { identifier = "OverBalanced"; label = "Over Balanced"; } value = "Completely Balanced" { identifier = "CompletelyBalanced"; label = "Completely Balanced"; }}
The enumeration is then used as an attribute type:
-- In the entity or virtual that uses this enumeration:attribute BalanceStatus Enumeration(BalanceStatusEnum) { label = "Balance Status"; editable = [false];}
And in an action parameter:
action ConnectSupplyToBalance { parameter OrderType Enumeration(BatchBalanceOrderType); -- another enum used as param type ...}
virtual AdjustOpInSplitVirtual { crud = Read, Update; ... -- Enumeration type on a virtual attribute: renders as a read-only dropdown in the dialog attribute OperStatusCode Enumeration(OperStatusCode) { label = "Status"; editable = [false]; } attribute WorkCenterCode Enumeration(WorkCenterCode) { editable = [false]; }}
Using Enumeration Values in Client Conditions
Once an attribute is typed as Enumeration(...), you reference its identifier (not its value) in client-side enabled, visible, and editable expressions:
-- Client command or field:command ReleaseCommand for BatchBalance { enabled = [BalanceStatus = "CompletelyBalanced"]; -- use the identifier execute { ... }}-- Visibility driven by enum value:field SomeField { visible = [OrderType = "ShopOrder"];}
Identifier vs. Value in Conditions
In client-side conditions, compare against the identifier string (the PascalCase one), not the value string stored in the database. The Marble runtime translates identifiers to database values automatically. Using the raw database value in a condition will silently fail.
Patterns & Tips
Prefer Enumerations Over Raw Text for Status Fields
If an attribute has a fixed set of valid values (status, type, category), define it as an enumeration rather than a plain Text attribute. You get a free dropdown in the UI, type safety in conditions, and clear documentation of what values are valid.
Naming Convention: Enum Name + "Enum" Suffix
IFS convention appends Enum to enumeration names: BalanceStatusEnum, OrderTypeEnum. Some older code omits the suffix (e.g., OperStatusCode). Either works, but consistency within your project matters.
Enumerations Are Not Validated in the Database
The database column stores the raw value string (e.g., "Not Balanced"). Oracle doesn’t know about the enumeration — there’s no CHECK constraint. Validation happens only in the Marble/PL/SQL layer. If you insert a row with a raw SQL script, you can bypass the enumeration.