Skip to main content

Enumerated field definition

Overview

Next Design allows you to define input method fields that select values from choices. Such fields are called enumerated fields.

The procedure for defining an enumerated field is described below in the following order:

  • Add an enum field
  • Remove the enum definition
  • Change enum settings

Image of enumerated field definition

Enumeration field definition


Add an enum field

There are several ways to add an enumerated field:

  • Define an enum in the class diagram and add a field
  • Define a new enum when adding a field

Define an enum in the class diagram and add a field

To add an enumerated field in a class diagram, do the following:

Define enums in class diagram and add fields

Operation procedure
  1. Drag and drop [Enum] from the class toolbox and enter a name.
  2. The newly added enum type has [Enumeration Literal_1] defined as the first choice. To change the value of an option, double-click the option you want to change, or select it and press the f2 key.
  3. To add a choice to the enum, move the pointer to the value display area of the enum, click the + icon that appears in the upper right corner of the value display area, and enter the value of the choice.
  4. This defines a set of choices as an enum.
  5. To add a defined enum field to an entity, click the + icon that appears in the upper right corner of the entity's field display area, just as you would add a field to an entity, and then click Add New. Opens the Fields dialog.
  6. When you specify the data type in the Add New Fields dialog, click the [...] button on the far right of Data Type to open the finder, just as you would when specifying an existing entity. ..
  7. Find the enum in the list on the finder and click it to enter the enum in Data Type.
  8. Enter the setting items in the [Add New Fields] dialog and click the [OK] button.
  9. This will add the enum field to the entity.

Define a new enum when adding a field

To define a new enum at the same time you add a field to an entity, do the following:

Define new enums when adding fields

Operation procedure
  1. Open the Add New Fields dialog, just as you would add a field to an entity.
  2. When specifying a data type in the Add New Fields dialog, click New Enum from the data type choices to open the New Enum Type dialog.
  3. Enter the setting items in the [New Enum Type] dialog.
  4. Enums always require one or more choices. To add choices to your enum, click the + icon at the bottom right of the Enum Literals grid to open the New Enum Literal dialog.
  5. Enter the settings in the [New Enum Literal] dialog and press the [OK] button to return to the [New Enum Type] dialog and add options to the enumeration.
  6. Enter the settings in the [New Enum Type] dialog and press the [OK] button to return to the [Add New Fields] dialog and enter the enumeration type in [Data Type].
  7. Enter the setting items in the [Add New Fields] dialog and click the [OK] button.
  8. This will define a new enum and at the same time add fields for that enum to the entity.

Remove the enum definition

There are several ways to remove an enum:

  • Remove the enum from the metamodel
  • Remove the enum from the class diagram (do not remove it from the metamodel and hide it in the class diagram)

Remove enums from the metamodel

To remove an enum from the metamodel, follow these steps, just as you would remove an entity.

Delete enum from metamodel

Operation procedure
  1. If you want to delete the enumeration type used as the data type in the field of the entity, delete the corresponding field in advance.
  2. Select the enum of interest in the class diagram and run Delete From Model from the context menu.
  3. This removes the target enum from the class diagram as well as the metamodel, and also removes the target enum from the profile navigator.
Attention
  • If you select the target enum in the class diagram and press the delete key, it will just be deleted from the class diagram, just like [Delete From Diagram] in the context menu. It is not deleted from and remains in the profile navigator.

You can also remove an enum from the metamodel by following these steps:

Other operating procedures
  1. Select the target enumeration in the profile navigator and execute [Delete] from the context menu, or press the delete key.

Remove enums from class diagram

To remove an enum from the class diagram and hide it, do the following:

Delete image enum type from class diagram

Operation procedure
  1. Select the target enumeration in the class diagram and execute [Delete From Diagram] from the context menu, or press the delete key.
  2. This will remove it from the class diagram, but not from the metamodel, and the enum of interest will remain in the profile navigator. To redisplay it in the class diagram, [Metamodel Definition> Model Structure Definition> Add Entity> Add Existing Entity to Class Diagram](./model-structure-definition#model-structure-definition-- Add it to the class diagram manually as well as add-exist-entity-to-class-diagram).

Change enum settings

To add choices to an enum or change the order of choices, use the Inspector as follows:

Change enum settings

Operation procedure
  1. Click View> Pane> Inspector from the ribbon to display the Inspector on the right side of the screen.
  2. Select the target enum in the class diagram or profile navigator.
  3. Select Enum Type in the tabs at the top of the Inspector.
  4. To add choices to the enum, click the + icon at the bottom right of the Enum Literals grid in the Enum group and enter your settings in the New Enum Literal dialog. Click the OK button.
  5. To remove a choice from an enum, select the value you want to remove in the Enum Literals grid in the Enum group and click the-icon at the bottom right.
  6. To change the order of the choices defined in the enum, select the values you want to reorder in the Enum Literals grid in the Enum group and click the โ†‘ and โ†“ icons at the bottom left. increase.