The subtract helper returns the difference between two numeric values. Use it to calculate adjustments, balances, or any value that requires deducting one number from another.
Syntax
{{subtract minuend subtrahend}}
minuend -- The number to subtract from. Required. Accepts a number, numeric string, or field reference.
subtrahend -- The number to subtract. Required. Accepts a number, numeric string, or field reference.
Examples
Subtract literal values
{{subtract 6 3}}
Output: 3
{{subtract "6" "3"}}
Output: 3
Subtract record field values
{{subtract record.ponies record.unicorns}}
{{subtract record.horses 6}}
Input:
{
"record": {
"ponies": "22",
"unicorns": "11",
"horses": 33
}
}
Output:
11 27
Return raw numeric output with triple braces
{{{subtract 10 4}}}
Output: 6
Use triple braces when downstream systems require the exact numeric output without Celigo's automatic string formatting.
Usage notes
- Both inputs must be numeric or parseable as numeric. Non-numeric strings produce
NaN. - Use triple braces (
{{{ }}}) if you need the raw numeric output without automatic formatting.