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

# Auto Number field

> A computed field that stamps each record with the next number in a sequence, optionally zero-padded to a fixed width.

<Info>
  The Auto Number field gives each new record the next number in a running sequence. The value is generated for you, so submitters never type it.
</Info>

Auto Number is a **computed** field. Its value is system-generated, the field is always required, and it does not appear as something a submitter can fill in.

## When to use it

Reach for Auto Number when you want a counter that climbs on its own:

* Sequential identifiers such as campaign numbers, batch numbers, or asset numbers.
* A readable running count that nobody has to track by hand.
* A numeric segment to fold into a [Concatenation](/reference/fields/concatenation) field.

<Warning>
  Do not use Auto Number when you need an unguessable or globally unique handle. Use [Terminus ID](/reference/fields/terminus-id) for a system-unique identifier, or [Random](/reference/fields/random) for a non-sequential token.
</Warning>

## How it works

The first time you submit a record, the field takes the next number in the sequence and keeps it for the life of that record. The displayed value is that number left-padded with zeros up to the `padding` width you set.

The sequence belongs to the field itself, not to a taxonomy. Every taxonomy that references the field draws from the same single run of numbers, so there is one continuous count rather than a separate count per taxonomy.

## Settings reference

| Setting       | Required | Default | Description                                                                      |
| ------------- | -------- | ------- | -------------------------------------------------------------------------------- |
| `start_value` | Yes      | None    | The first number in the sequence.                                                |
| `padding`     | No       | `0`     | Zero-pad the number to this many digits, from `0` to `10`. `0` means no padding. |

## Example

A `campaign_number` field on a Campaigns taxonomy:

```yaml theme={null}
name: campaign_number
type: auto_number
settings:
  start_value: 1
  padding: 5
```

The first campaign record gets `00001`, the next `00002`, and so on. Padding sets a minimum width, not a maximum: once the count reaches `100000`, all six digits print in full.

## Gotchas

* **The sequence is per field, not per taxonomy.** Every taxonomy that uses the field shares the same run of numbers.
* **Numbers can have gaps.** A number is claimed when you first submit a record. If that record is later discarded, the number is not reissued, so treat the sequence as ever-increasing rather than gap-free.
* **The sequence never runs backward.** Raising `start_value` moves the next number forward, but lowering it does not reissue earlier numbers. This is deliberate, to avoid duplicates.
* **`padding` controls display width only.** It sets the number of leading zeros, not the largest possible value.
* **It is read-only.** The number is generated for you and cannot be set or edited in the submission form.

## Related

* [Fields](/reference/fields)
* [Random field](/reference/fields/random): non-sequential random strings.
* [Terminus ID field](/reference/fields/terminus-id): a system-unique identifier when a sequence is not what you need.
* [Other computed fields](/recipes/other-computed-fields)
