> ## Documentation Index
> Fetch the complete documentation index at: https://archie.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Inline enum field

> Inline enum fields constrain a column to a fixed list of values defined directly on the field — no shared Data Type required.

An inline enum field constrains a column to a fixed list of allowed values, defined directly on the field. It's the right choice when the list is specific to one column on one table and you don't need to share it elsewhere.

Common examples:

* A `priority` field with `LOW`, `MEDIUM`, `HIGH`
* A `visibility` field with `PUBLIC`, `PRIVATE`
* A `payment_method` field with `CARD`, `BANK_TRANSFER`, `CASH`

## Inline enum vs. user-defined enum

Both options give you the same protection — only listed values are accepted. The difference is reuse:

| Choose this                                                          | When                                                                                                                                        |
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **Inline enum**                                                      | The list of values lives on exactly one field. Editing the list edits only that field.                                                      |
| **[User-defined](/features/backend/data-model/fields/user-defined)** | The list needs to stay consistent across multiple fields or tables. Defined once as a [Data Type](/features/backend/data-model/data-types). |

If you find yourself copy-pasting the same enum values onto multiple fields, switch to a [Data Type](/features/backend/data-model/data-types) instead.

## Configuration options

| Option            | Description                                                                                 |
| ----------------- | ------------------------------------------------------------------------------------------- |
| **Name**          | The system identifier used in the GraphQL and REST APIs (for example `priority`, `status`). |
| **Description**   | An optional internal note explaining what the field captures.                               |
| **Values**        | The list of allowed values. Add and remove rows as needed.                                  |
| **Default Value** | One of the listed values, assigned to new records when no value is provided.                |
| **Mandatory**     | If on, the record cannot be saved without one of the listed values.                         |
| **Unique**        | If on, no two rows can share the same value. Rarely useful for enums.                       |

## How it appears in the API

The field is generated as a typed enum in GraphQL — clients get autocompletion of allowed values and the API rejects any value outside the list. See the [GraphQL API Explorer](/features/backend/graphql-api-explorer/overview) for the generated enum type.

## Permissions

Inline enum fields are subject to the per-role read and write rules configured in [Role-Based Access](/features/backend/app-services/role-based-access).

## FAQ

<AccordionGroup>
  <Accordion title="When should I switch from inline to a Data Type?">
    The moment you want the same list on a second field. Inline enums are independent — editing one doesn't update any others. A [Data Type](/features/backend/data-model/data-types) is shared, so editing it once propagates everywhere.
  </Accordion>

  <Accordion title="What happens if I remove a value that existing records use?">
    Records that hold the removed value will fail validation on update until you reassign them. Plan removals carefully — consider migrating affected rows first, then removing the value.
  </Accordion>

  <Accordion title="Can I add new values without breaking existing rows?">
    Yes. Adding a value is safe; existing records keep their current values and the new option becomes available going forward.
  </Accordion>

  <Accordion title="Can I rename a value?">
    Renaming changes the enum on the field but does not rewrite existing rows. After renaming, update any rows holding the old value to the new one.
  </Accordion>
</AccordionGroup>
