The floor helper rounds a numeric value down to the nearest whole integer. Use it when you need to truncate decimals without rounding up -- for example, calculating the number of complete units from a fractional quantity.
Syntax
{{floor field}}
field -- The numeric value to round down. Required. Accepts a number, numeric string, or field reference. If the value is already an integer, it's returned unchanged.
Examples
Round down a hard-coded number
{{floor 22.44}}
Output: 22
Round down a record field
{{floor record.total}}
Input: record.total is 45.25
Output: 45
Round down a numeric string
{{floor "3.14"}}
Output: 3
Usage notes
- Integer values pass through unchanged:
{{floor 45}}returns45. - Negative values are rounded down away from zero:
{{floor -2.8}}returns-3, not-2. - The input must be numeric or parseable as numeric. Non-numeric values produce unexpected results.
- To round up instead, use the ceil helper.