Enumerations

An enumeration (or enum for short) can be used to group values within a type. Enums can be useful to filter and define certain content entries in your project.

A Product model may contain the enum COMMODITY_TYPE, and values DIGITAL and PHYSICAL.

Enums values can only contain alphanumeric characters and underscores.

Working with Enums

Creating an Enumeration

  1. Navigate to the schema editor in the side-bar.
    If you don't see it, your role does not have access to the schema editor.
  2. In the collapsible side-bar, next to the label "Enumerations", click the "+ Add" button.
  3. Provide a display name, API ID and description.

Adding Options to an Enumeration

After creating the enumeration:

  1. Add a value in the input of the "Enumeration Values" fields.mdx.. Enums must begin with a capital letter
  2. Press the return key or press the "Add to List" button.
  3. Continue adding more items until the list is complete.

Removing Options from an Enumeration

  1. Navigate to the Enumeration area of the schema editor.
  2. Open an enumeration you'd like to edit by pressing the "edit" button below the name of the enumeration you'd like to edit.
  3. Locate the "-" icon next to the Enumeration pill.
  4. Press the minus button to remove the Enumeration from the list.
  5. Press "Update Enumeration".

Delete an Enumeration

  1. Navigate to the Enumeration area of the schema editor.
  2. Press the "delete" button below the name of the enumeration you'd like to delete.

For more information on how to us Enumerations, read the guide on working with dropdown fields.


Were you expecting something more?

We are constantly contributing to our documentation, but if you spot something we're missing, let us know and we'll be sure to add it.

This site uses cookies to provide you with a better user experience. For more information, refer to our Privacy Policy