Subtract
Input
| value |
|---|
Subtract 10 from value
transformation:subtract
Subtract operand from source field
source:value
parameters
- operandMode
- operandField
- operand
- decimalPlaces
- roundingMode
Use another row field or a numeric constant
Row field to combine with the source field
Numeric constant to combine with the source field
Round result to N decimal places before writing to output (0–20). Omit to keep full precision.
How to handle ties (only used when decimalPlaces is set)
Output
| value |
|---|
| 2 |
| -17 |
| 90 |
| -10 |
| -7 |
| -11 |
Sample inputs run locally in your browser using the same operation logic as Fontana Flow.
Results are illustrative, not connected to a workflow.
Subtract operand from source field.
Parameters
- operandMode (Operand type, string, optional) — Use another row field or a numeric constant. Allowed values:
field,literal. - operandField (Operand field, string, optional) — Row field to combine with the source field. Default:
"". - operand (Literal operand, number, optional) — Numeric constant to combine with the source field. Examples:
0,1,100,0.1. - decimalPlaces (Decimal Places, number, optional) — Round result to N decimal places before writing to output (0–20). Omit to keep full precision. Examples:
0,2,4. - roundingMode (Rounding Mode, string, optional) — How to handle ties (only used when decimalPlaces is set). Allowed values:
halfUp,halfDown,halfEven.
Field selection
- source — Field whose values this operation reads. Omit to apply to all fields on the row.
- target — Optional output field. When omitted, the source field is updated in place.
JSON Configuration
{ "id": "op-subtract", "type": "transformation", "action": "subtract", "params": { "operandMode": "literal", "operandField": "", "roundingMode": "halfUp", "operand": 10 }, "testInputs": [ "12", "-7", "100", "0", "3.5", "-0.5" ]}