Number
A numeric field, stored as a number rather than as text.
Where to find it
Architect Panel → Data:
- Datastores — the datastore, then Table Designer to add or edit a field
Why the type matters
A number in a text box sorts alphabetically — 10 before 9, 100 before 20 — cannot be totalled, averaged or compared, and accepts "about five". None of that is recoverable without a migration.
If a value will ever be summed, compared or ranked, it belongs in a number field.
Decide the precision
How many decimal places, and be deliberate about it. Two questions settle most cases:
- Is it a count? Whole numbers, no decimals. Half a person is a modelling error.
- Is it money? Two decimal places for most currencies — and see below, because money has a second problem.
Money needs more than a number
An amount without a currency is ambiguous the moment you trade in more than one, and adding currency later means interpreting every historical value.
Where amounts matter, look at how the platform's ledger handles it: an amount is stored alongside its currency and the rate applied, so a historical figure still means what it meant. A bare number field is fine for a single-currency business and a trap for one that grows.
Rounding compounds
Store enough precision for the calculation, not just for the display. A unit price rounded to two places and then multiplied by a quantity produces a total that disagrees with the same sum done properly — by pennies, which is exactly the kind of discrepancy that consumes an afternoon.
Where a value feeds a calculation, keep the precision and round at the point of display.
Set a range where one exists
A quantity that cannot be negative, a percentage that cannot exceed 100, an age that cannot be 300. Range validation catches typos — a mistyped extra digit is the commonest data error there is, and it is invisible in a list of numbers.
Zero is not blank
Decide whether the field can be empty and what that means. Zero and "not recorded" are different facts, and conflating them makes averages wrong: a blank treated as zero drags a mean down, and a zero treated as blank hides a real value.
Watch identifiers that look numeric
Reference numbers, account numbers and postcodes are not numbers even when they contain digits. They have leading zeros that matter, they are never arithmetic, and storing them as numbers silently strips the zeros.
If you would never add two of them together, it is text.
Worked example
An order line stores quantity as a whole number with a minimum of one, and unit price to four decimal places even though it displays two — so line totals agree with the invoice. The customer's account number, which begins with a zero, is a text field.
Recommendations
- Anything summed or compared belongs in a number field.
- Keep calculation precision, round at display.
- Validate the range — it catches mistyped digits.
- Identifiers are text, however numeric they look.