Math
Computes a number from the value and other columns.
Group: Numbers
When to use it
Section titled “When to use it”A price with VAT, a price without VAT, a discount, a margin.
Settings
Section titled “Settings”- Expression: write a column as
{name}and the current value asvalue. Use+ - * / %, parentheses and the functionsround,floor,ceil,abs,minandmax. - Decimals of the result: a fixed number, or As needed.
- Decimal separator: set it if your catalog has prices with 3 decimals.
Example
Section titled “Example”| Before | After |
|---|---|
100 |
120 ({price} * 1.2) |
119.99 |
99.99 (round({price} / 1.2, 2)) |
3 |
0 (max(value - 5, 0)) |
Good to know
Section titled “Good to know”- Numbers are read like prices:
1 234,56 €is read as 1234.56. - A product whose numbers cannot be read, or that divides by zero, gets an empty value, and the run log says how many.
- A mistake in the expression is refused when you save, with its position.