Articles in this section

round helper

Use the round helper to convert a numeric value (including a string representation of a number) to the nearest whole integer. This is commonly used for rounding tax, totals, or any decimal-based fields in a record.

Usage

{{round field}}
  • field: The field or variable containing a decimal or numeric-like string (e.g., record.vat).

Examples

  1. Rounding a tax amount

    If record.vat is "29.77", then:

    {{round record.vat}}
    

    results in 30.

  2. Rounding down

    If record.discount is 19.4, {{round record.discount}} yields 19.

  3. Using triple braces (though generally not needed for numbers)

    {{{round record.fee}}}
    

    Returns the raw rounded value without any automatic string formatting (e.g., quotes).

Tip

  • If the field is already an integer (e.g., 42), round returns the same value.

  • Ensure the field contains a valid numeric string; otherwise, round may produce unexpected results or an error.

  • Consider other numeric helpers (if available) if you need more precise decimal handling or control over rounding (e.g., to a specified number of decimal places).