Modify Value expression – transforming a value step by step¶
The modify value expression takes one value and applies a chain of rules to it: cut out a part of a text, format a date, read a value from JSON, round a number, encode, compare. It is the tool for every "take this value and turn it into that one". All rules are described on the page Value modification rules.
1. At a glance¶
| Purpose | Transforms an input value with an ordered list of rules |
| Typical use | Formatting dates and numbers, extracting values from e-mails or API responses, building JSON, fallbacks for empty values |
| Returns | The result of the last rule |
| Related | Value modification rules, Text, Case |
2. Settings¶
| Setting | Meaning |
|---|---|
| "Input" | The value that is transformed – a field, a variable, an API response, a fixed value |
| "Modification Rules" | The list of rules. The add button adds a rule; the arrows change the order; the minus icon removes a rule. |
| "Type" (per rule) | Which rule is applied, for example TextAfter, DateTimeFormat, JObjectJsonPathValue |
| Parameters (per rule) | The parameters of the rule, shown with their names (for example "TextBefore", "Format", "Path"). Every parameter is an expression; for fixed values, type the value directly. |
When you choose a type, the editor shows exactly the parameters that rule needs.
3. Behaviour¶
- "Input" is evaluated.
- The rules are applied from top to bottom. Each rule works on the result of the rule before it.
-
The result of the last rule is returned.
-
A parameter left empty counts as an empty text. What a rule does with an empty parameter is listed per rule in the reference.
- Many rules leave a value unchanged that does not fit them (for example
MathRoundon a text). The details are listed per rule. - If a rule fails with an error – for example
DecodeBase64on a value that is not Base64 – the whole expression returns an empty value. - Without "Input", the expression returns an empty value and no rule runs. To build JSON from
nothing (with
JObjectSetPropertyorJArrayAppend), use an input that returns an empty text.
Thinking in steps¶
A chain moves the value from one shape to the next. With JSON, for example, the value is first an
object, after JObjectJsonPathArray an array, after JArrayFirstElement an object again. Choose each
rule for the shape the value has at that point of the chain – the rules starting with JObject
expect an object, those starting with JArray an array (likewise XObject and XArray for XML).
4. Examples¶
Date in German format: Input = field "Due on", rule DateTimeFormat with Format dd.MM.yyyy.
Result: 23.10.2026.
Value from an e-mail line "Order number: 4711": Input = the mail body, rule
TextAfterUntilEndOfLine with TextBefore Order number:, rule TrimStart with Characters empty.
Result: 4711.
Customer name from an API response: Input = variable "Response" containing
{"customer":{"name":"Contoso"}}, rule JObjectJsonPathValue with Path customer.name. Result:
Contoso.
Fallback for an empty number: Input = field "Discount", rule Coalesce with Value 0.
Two outcomes: Input = field "Subject", rule Contains with Value urgent, rule Conditional
with TrueValue High and FalseValue Normal.