# Understanding how sequences work

How a sequence builds the next document number and when its counter advances.

Source: https://support.toolingmetrics.com/en/admin/overview/sequences/
Updated: 2026-10-29

A **sequence** is the numbering pattern for one document type. Tooling Metrics uses it to suggest the number of each new record — purchase orders, items, tools, parts, picklists, and the other types listed in [Sequences](https://support.toolingmetrics.com/en/admin/reference/sequences/). Every organization starts with one sequence per document type, so numbering works from day one.

## How the next number is built

A number is the **Prefix**, followed by the **Subsequence** evaluated against today's date (if set), followed by the **Next Number** zero-padded to **Size** digits.

| Prefix | Subsequence | Size | Next Number | Generated number |
|---|---|---|---|---|
| `PO` | `/%y/` | `4` | `42` | `PO/25/0042` (in 2025) |
| `T` | *(blank)* | `5` | `1` | `T00001` |

The subsequence is a date pattern, so a sequence with `/%y/` starts showing the new year automatically on January 1. The counter itself does not reset — set **Next Number** back by hand if you want each year to start at 1.

## When the counter advances

1. When you open a new record, its number field is filled with the number the sequence would generate now.
1. When the record is saved, the sequence's **Next Number** increases by its **Step**.
1. The counter only moves when a record is actually created, so opening and cancelling a form doesn't use up a number.

Records created automatically — the purchase orders, transfers, and scrap lists from the Inventory Scheduler, the receipts and restocks from Automatic Purchase, and the picklists from the Setup Assistant — take their numbers from the same sequences.

## Things to keep in mind

- **Changes apply to new records only.** Existing documents keep their numbers.
- **The counter doesn't check for duplicates.** Lowering **Next Number**, or setting **Step** to `0`, makes the sequence generate numbers that are already in use.
- **Each prefix must be unique** in the organization, so each document type's numbers are easy to tell apart.
- **A deleted sequence stops suggesting numbers.** New records of that type then open with an empty number field.

To change a sequence, follow [Set up document sequences](https://support.toolingmetrics.com/en/admin/tutorials/set-up-sequences/). Every field and default prefix is listed in the [Sequences reference](https://support.toolingmetrics.com/en/admin/reference/sequences/).
