Comment on page
To add an enum to your data model:
- Hover over the + icon in the bottom-right of the data model designer.
- Click Create Enumerated Type.
A typical use case for an enum is to store possible State values for an object, such as Planned, In Progress, and Complete.
As an example, an
Eventobject class might need a property to track if an event has occurred or not. The value of this property can be one of a set of fixed values.
To store these values you can create an enum called
Event Statewith three enum values. The values can be given the display names
Complete. Once the Event State enum is created, you can add a
Stateproperty to the Event object class, with the data type
Event State, tying the enum to the object class.
Enum values are often exposed in the UI using the Select component, enabling the user to view the available options and make a selection.
Enum values are the key-value pairs, or available options, within an enum.