Skip to content

Enumeration

New Enumeration

To add a new class go to the Add New Model Item button and select the New Enumeration Option.

Add New Enumeration

The Editor will create an empty Enumeration for you:

Empty Enumeration

Alternatively, you can right-click anywhere in the Business Object Designer and select the New Enumeration option from the Menu that will appear.

Add New Enumeration by Right-Click

Important

After creating your Enumeration, you will be able to access it via the Domain Namespace, like so:

Domain.YOUR_ENUMERATION_NAME.ENUMERATION_VALUE; 

/** Example **/
var birthdayMonth = Domain.Months.November;

Available Operations

By right-clicking on a selected Enumeration, you will see a Menu like this:

Enumeration Menu

Add Attribute

You can add a new Attribute (a.k.a. Value) into your selected Enumeration using one of two ways:

  1. Selecting Add Attribute from the menu
  2. Selecting your Enumeration and hitting the Insert key

Refactor

By refactoring an Enumeration, you are basically changing its name, but in such a way that it is changed in any other Model that might use it.

Attention

To simply rename an Enumeration, double click on it and type in the new name. (Alternatively, you can use the Property panel). Remember, however, that if you rename your Enumeration, the changes will be local, meaning that all other Models will be still using its previous name. To globally rename an Enumeration, use the refactor option.

Tip

If you are just beginning your Modeling and you know that your enum is not used anywhere, a simple rename is enough.

Find Usages

The Find Usages option is very helpful if you want to find all the Models that might be using your Enumeration. All the hits will be presented in the Console, inside the Symbols panel. From then on, you will be able to Navigate to each Model that uses your Enumeration, by double-clicking on the record you want, presented in said Console.

For example, the image that follows shows you that the Day enumeration is used (among others):

  • In the Store Business Object Model.By double-clicking it, you will be naviagated to that Model.
  • In the ErrorPage form, within its Model. By double-clicking it, you will be naviaged to that Form .

Find Usages Result

Properties

Every ernumeration has a set of properties that you can define, visible in the Properties Grid.

Enumeration Properties

An explanation of each property follows:

Property Description
Name Name of the Enumeration
Notes Useful notes regarding the Enumeration

Attributes

The Attributes are the values that the Enumeration might have.

Available Operations

By right-clicking on a selected Attribute within an Enumeration, you will see a Menu like this:

Attribute Menu

Refactor

By refactoring an Attribute, you are basically changing its name, but in such a way that it is changed in any other Model that might use it.

Attention

To simply rename an Attribute, double click on it and type in the new name. (Alternatively, you can use the Property panel). Remember, however, that if you rename your Attribute, the changes will be local, meaning that all other Models will be still using its previous name. To globally rename a Attribute, use the refactor option.

Tip

If you are just beginning your Modeling and you know that your Attribute is not used anywhere, a simple rename is enough.

Tip

If you choose to simply rename your Attribute, all Classes that are accessing it, will be aware of the new name. Thus, the refactoring is only required if a different Model accesses this Attribute (example: a Form Model, an API and anything else outside the Business Objects Models)

Find Usages

Same logic as the one described earlier, for the Enumeration.

Find Usages

Same logic as the one described earlier, for the Enumeration.

Move Up

Displays the selected attribute one row higher, in the list of the Class' Attributes

Move Down

Displays the selected attribute one row lower, in the list of the Class' Attributes

Properties

Every Attribute has a set of properties that you can define, visible in the Properties Grid.

Attribute Properties

An explanation of each property follows:

Property Description
Name Name of the Attribute (or Value)
Notes Useful notes regarding the Enumeration

Design Rules

  • The name of any Enumeration must be unique throughout your whole Application
  • The name of any Enumeration cannot be the same as the Application's name
  • An Enumeration must have at least one (1) value

Remarks

If your Enumerations and Classes clutter your designer, find out how to clear the space up here.