Counters and record numbers
Section titled “Counters and record numbers”This guide is for builders. The platform uses the word counter for two different things, and this page covers both:
- A counter widget shows people a live count in the top bar — 12 open requests, 3 tasks due today — and lists the records behind it.
- A sequence field gives every new record a running number — a request number, an invoice number, a ticket ID.
| Counter widget | Sequence field | |
|---|---|---|
| Answers | How many records match right now? | What is this record’s number? |
| Built from | A view, optionally narrowed by a saved query | A field on the entity |
| Changes | Goes up and down as records change | Given once, when the record is created |
Show a live count with a counter widget
Section titled “Show a live count with a counter widget”A counter widget is a badge in the top bar, next to notifications. Selecting it shows the count and the matching records; selecting a record opens it in the view the counter is built on. Counters need no programming and keep themselves up to date.
Before you start: the view the counter counts must have the Counter view display turned on in its settings (see Data views). If you want to count only some records — open requests, say — save a query on the entity first.
- Open Administration › Applications › Counters.
- Select New Counter.
- Enter a Name (Arabic and English), choose an icon and, optionally, add a Description.
- In View, choose the view whose records are counted.
- Optionally, in Counting Criteria, choose a saved query of that entity. The counter then counts only the records that match it.
- Save. The counter appears in the top bar. Who sees it follows the rules in Counter widgets.
To change a counter, edit it in the list and save. To change the order of counters in the top bar, drag them in the list; by default they are in the order they were created. To remove one, select it and use Delete Counter; this cannot be undone.
Counts also appear as Number cards on dashboards and as counter widgets on pages — see Dashboards & summaries and Pages & widgets.
Number records automatically with a sequence field
Section titled “Number records automatically with a sequence field”Add a Sequence field to an entity to give each new record the next number in line.
- Open the entity’s designer and drag a Sequence field onto the Structure tab.
- Give it a name, for example Request number.
- In Auto increment settings, set the Starting value (for example 1000) and Increment by (usually 1).
- Select Save.
The first record gets the starting value, and each new record after it gets the previous number plus the increment: 1000, 1001, 1002…
Restart the numbering per year, department or branch
Section titled “Restart the numbering per year, department or branch”Turn on Conditional Sequencing when each group of records should have its own run of numbers — a fresh run each year, or a separate run per branch. Add a Key with a Type and a Value that works out the group from the record — for example the year the record was created. Each different key value starts its own run at the starting value.
With conditional sequencing the same number can appear once in each group, so the field is no longer required to be unique across all records.
For a reference such as LC-2026-0001 that includes the year and leading zeros, combine a year-keyed sequence with a second field that builds the text — see Formatted references.
Good to know
Section titled “Good to know”- Numbers are given when a record is created, never when it is edited. Two people creating records at the same moment never get the same number.
- Decide before you go live. Once the first number has been given, the starting value, the increment and the conditional-sequencing keys are fixed. To change them, add a new sequence field.
- A number is just a number. Prefixes and leading zeros come from a second field, as in the formatted-reference recipe above.
- If a number cannot be given, the record is still saved, with the sequence field empty. Check the field’s settings if new records arrive without a number.
Troubleshooting
Section titled “Troubleshooting”| Problem | What to check |
|---|---|
| A counter does not work with a view | The view must have its Counter view display turned on. |
| A counter shows a different number than the view | The counter’s Counting Criteria narrows it, or the person’s permissions hide some records from them. |
| New records have no number | The sequence field’s settings are incomplete or invalid; the record is saved without a number rather than refused. |
| The starting value cannot be changed | Numbers have already been given from this sequence. |
Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27