Multiply
Multiplies two or more values together and merges the result. The most common use is a line total, a quantity multiplied by a unit price.
Syntax
{{multiply value1 value2 ... precision=n culture="xx-XX"}}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Values | Number | Required | Two or more values to multiply. |
| precision | Number | Optional | Number of digits after the decimal point. When you set it, trailing zeros are kept, which is usually what you want for money. |
| culture | Text | Optional | The culture used to format the result. Defaults to your account's culture. |
Note: If a value is empty or is not a number, it counts as 0. Because anything multiplied by 0 is 0, a missing value here makes the whole result 0, so it is worth checking the field is populated.
Examples
The examples below are based on the following sample content:
Line total: {{multiply Contact.qty Contact.unitPrice precision=2}}
A. Quantity is 3, unit price is 12.50
Line total: 37.50
B. Without a precision, using {{multiply Contact.qty Contact.unitPrice}}
Line total: 37.5
C. Quantity is empty
Line total: 0