The divide helper returns the quotient of two numeric values. Use it to calculate rates, split totals, or normalize values within a flow.
Syntax
{{divide number1 number2}}
number1 -- The dividend. Required. Accepts a number, numeric string, or field reference.
number2 -- The divisor. Required. Accepts a number, numeric string, or field reference. Do not pass 0 -- dividing by zero produces unexpected results.
Examples
Divide two record fields
{{divide record.item1 record.item2}}
Input: record.item1 is "33", record.item2 is "11"
Output: 3
Divide hard-coded values
{{divide "2002" "100"}}
Output: 20.02
Divide a field by a hard-coded value
{{divide record.total 3}}
Input: record.total is 33
Output: 11
Usage notes
- When division produces a remainder, the result is a floating-point number:
{{divide 10 3}}returns3.3333333333333335. - Do not pass
0as the divisor. Dividing by zero produces unexpected results. - All inputs must be numeric or parseable as numeric. Non-numeric values produce unexpected results.
- To round the result, pass the output to the round helper or floor helper.