Reference numbers
Counters that issue formatted references — INV-00001, CLM-0042 — allocated exactly once per submission and never reissued. A record's reference is the thing people quote on the phone, so nothing is allowed to change it.
Creating a generator
Under Reference numbers (sequence:read to view,
sequence:write to manage), a generator carries a prefix, a suffix, how many
digits to pad to, and where the count starts. The editor previews the next reference as you
type, so you can confirm the format without consuming a number.
| Setting | Notes |
|---|---|
| Prefix / suffix | Any text — INV-, /24. |
| Digits | Zero-padding, 1 to 20. Five digits makes 00001. |
| Start at | Fixed when the generator is created — use Reset to move the counter afterwards. |
Using one on a form
In the logic builder, add a rule whose effect is a reference number, naming the generator and the field the value should land in. A rule can override the prefix or suffix for that form alone, which is how one counter serves several document types.
Publishing checks the wiring: a rule that names no generator, names one that does not exist, or names no field to write into is refused with that exact reason.
Allocated once, and only on a real save
The engine never allocates while it is evaluating. It records that a number is wanted, and the allocation happens on the save path — under a row lock, so two submissions arriving at the same instant cannot receive the same number.
That distinction has consequences you can rely on:
- Previewing a form burns no numbers. Neither does a failed validation, nor simply reading a record.
- Editing a submission never renumbers it. The reference is looked for across every earlier version of the record, not just the one being written.
- The number is server-owned. It is stored as computed data, so no client can supply or alter one.
Resetting
Reset is the only way to move a counter, and it is deliberately separate from editing: setting it backwards can produce a duplicate reference, so the action is called out in the interface and recorded in the audit log with who did it.
A common legitimate use is the new financial year — change the suffix to
/25 and reset to 1.
If a generator goes missing
Archiving a generator that a live form still uses does not break submissions: the allocation is skipped and the record saves without a reference rather than failing for the person filling it in. That is deliberate — but it is also why forms cannot be published referencing a generator that is not there. A form that quietly stops numbering its records is worse than one that refuses to publish.
Imported history
Importing submissions from a CSV records the reference from the file verbatim instead of allocating a new one, so historic records keep the numbers people already know. Set the generator's counter above your highest imported number afterwards, or the next real submission will collide with your history.