> ## 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.

# User-defined field

> User-defined fields use a reusable Data Type (enum) that's shared across tables. Define the list once, apply it everywhere.

A user-defined field uses an existing reusable [Data Type](/features/backend/data-model/data-types) — typically a named enum — as the field's type. Define the list of allowed values once as a Data Type, then apply it to as many fields as you need. Editing the Data Type updates every field that uses it.

Common examples:

* A `course_status_enum` shared by `courses.status` and `applications.course_status`
* A `priority_enum` shared by every table that has a priority column
* A `country_code_enum` shared by `users.country` and `addresses.country`

## User-defined vs. inline enum

Both constrain a column to a fixed list of values. Pick based on whether the list is shared:

| Choose this                                                        | When                                                                           |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| **User-defined**                                                   | Multiple fields or tables need the same set of values. Single source of truth. |
| **[Inline enum](/features/backend/data-model/fields/inline-enum)** | The list is unique to one field and doesn't need to be reused.                 |

If you don't have a Data Type yet, create one first — see [Data Types](/features/backend/data-model/data-types).

## Configuration options

| Option            | Description                                                                                          |
| ----------------- | ---------------------------------------------------------------------------------------------------- |
| **Name**          | The system identifier used in the GraphQL and REST APIs (for example `status`, `role`).              |
| **Description**   | An optional internal note explaining what the field captures.                                        |
| **Enum Type**     | Pick from the list of existing [Data Types](/features/backend/data-model/data-types) in the project. |
| **Default Value** | One of the values defined on the chosen Data Type.                                                   |
| **Mandatory**     | If on, the record cannot be saved without one of the allowed 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 the same enum type wherever the Data Type is referenced. Updating the Data Type — adding, removing, or renaming values — propagates to every field that uses it and to every place the type appears in the GraphQL schema. See the [GraphQL API Explorer](/features/backend/graphql-api-explorer/overview) to inspect the generated types.

## Permissions

User-defined 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="What happens if I edit the Data Type after applying it to fields?">
    Every field that uses the Data Type sees the change immediately. Adding a value is safe; removing one will fail validation on rows that still hold the removed value, so plan removals carefully.
  </Accordion>

  <Accordion title="Can I switch a field from inline enum to user-defined later?">
    Yes — change the field type and pick the matching Data Type. Existing values that match the Data Type's allowed list carry over; values that don't will need to be migrated.
  </Accordion>

  <Accordion title="How do I create a new Data Type from inside the field configuration?">
    Open the Data Model sidebar, click the dropdown arrow next to **+ Add Table**, and choose **Add Data Type**. Once created, it becomes available in the Enum Type picker on any user-defined field.
  </Accordion>

  <Accordion title="Can I use a Data Type that isn't an enum?">
    Today, Data Types are enums — that's the built-in shape. The user-defined field is the way to apply that shape to a column.
  </Accordion>
</AccordionGroup>
