Counter Fields
Counter fields generate sequential, human-readable identifiers with a customizable prefix.
Creating a counter field
Section titled “Creating a counter field”POST /api/apps/{app}/tables/invoices/fields{ "name": "number", "type": "counter", "config": { "prefix": "INV" }}This produces values like INV-000001, INV-000002, INV-000003.
How counters work
Section titled “How counters work”- Guaranteed unique across all records
- Padding starts at 6 digits and expands automatically as the table grows
- Values are assigned on record creation and cannot be changed
- Searchable via the global search endpoint – search for
INV-42to findINV-000042
Optional config
Section titled “Optional config”| Option | Description |
|---|---|
prefix | Uppercase A-Z, max 10 characters |
suffix | Appended after the number (max 10 characters) |
pad_length | Fixed zero-padding width instead of the default dynamic padding |
start | First value in the sequence |
step | Increment between values |
Constraints
Section titled “Constraints”- One counter per table – a table can have at most one counter field
- The field is automatically named
numberregardless of the name you provide - Prefix must be uppercase A-Z, max 10 characters
Counters are per table
Section titled “Counters are per table”There is no counter shared across several tables. Virtual tables once offered one; they were removed, and union views — which replaced the use case — deliberately have no union-level counter, because a counter that spans tables gives one record two identities.
Give each table its own counter with its own prefix. Reading them together through a
union view then shows TASK-000001 beside INC-000004, where the prefix tells you
which member a row came from without consulting the discriminator column.