Use {{floor}} to round a numeric value down to the nearest whole integer. This helper finds the largest integer less than or equal to the given number.
{{floor field}}
-
field: A numeric or string-parsable numeric value (e.g.,
3.14,"45.25",record.total).
-
Hard-coded number
{{floor 22.44}}Outputs
22. -
Record field
{{floor record.total}}If
record.totalis45.25, the result is45. -
String literal
{{floor "3.14"}}Returns
3.
Tip
-
Negative values go “down” away from zero (e.g.,
-2.8becomes-3). -
Confirm the input is numeric (or convertible to a number). Non-numeric strings could produce unexpected results.
-
Use
{{ceil}}if you need the opposite behavior (rounding up).