StableField type
Decimal
Overview
A number that always keeps two decimal places — percentages, rates, hours worked, weights.
Purpose
Use it when precision to the hundredth matters but the value is not money (for money, use Currency so it is formatted with the symbol).
Inputs
- Fits the Number input (set its Step to 0.01). Validation: Minimum / Maximum value.
Configuration
- Options on every editable field: Required, Unique (no duplicates) (checked case-insensitively against existing records), Description (shown to teammates and the AI), a default value and a custom validation message that replaces the standard one.
- Use Number when you need more than two decimals.
Outputs
- Stored rounded to 2 decimals (
12.345becomes12.35). Displayed with the app's locale.
Example
Hours worked
Example
Field: Hours · Type: Decimal · Minimum value: 0 Example value: 7.5
Errors
- “Hours must be a number”, “Hours must be at least 0”.
Limitations
- Values are rounded on save, not rejected, when they have more than two decimals.
- An empty value is stored as empty (null); a Required field rejects it with “<Label> is required”.
Advanced
- Same parsing as Number; stored as
Math.round(n * 100) / 100.