Usage Contexts
The expression engine is used in four different features, each with slightly different behavior, available variables, and capabilities.
Find & Replace
Used in: Editor → Find & Replace → Replace field (when replacement contains {{...}})
How it works: When you enter a replacement value like {{old.toUpperCase()}}, the expression is evaluated for each matched value. The old variable holds the current value being replaced.
Available variables:
old— the current value being replaced (auto-wrapped in StringWrapper for method access)
Example:
| Search | Replace | Input | Output |
|---|---|---|---|
hello | {{old.toUpperCase()}} | "hello" | "HELLO" |
100 | {{old + 50}} | 100 | 150 |
alice | {{old + "@example.com"}} | "alice" | "alice@example.com" |
Replace modes:
- Value mode — replaces only matched values
- Key mode — replaces matched key names
- Set mode — sets matched fields to a new value
Error behavior: On error, the replacement value becomes [ERROR: message] as a string.
The old variable is automatically wrapped so you can call string methods like .toUpperCase(), .trim(), .split() even when the original value is a number or boolean — it gets converted to a string first.
Tabular Operations
Used in: Pipeline → Tabular Operations utility
How it works: Expressions are evaluated per row in an array of objects. Each row’s fields are directly accessible as variables.
Available variables:
- All fields of the current row (e.g.,
name,age,price) - Built-in functions (Math, Date, stringify, toString, keys, values)
Operations that use expressions
filter — Keep rows matching a condition
condition: {{age >= 18}}The expression is evaluated for each row. Rows where the result is truthy are kept.
// Input
[
{ "name": "Alice", "age": 25 },
{ "name": "Bob", "age": 12 },
{ "name": "Carol", "age": 30 }
]
// After filter with {{age >= 18}}
[
{ "name": "Alice", "age": 25 },
{ "name": "Carol", "age": 30 }
]addColumn — Compute a new field
name: fullName
formula: {{firstName + " " + lastName}}The expression is evaluated for each row, and the result is stored as a new field.
// Input
[{ "firstName": "Alice", "lastName": "Smith" }]
// After addColumn "fullName" with {{firstName + " " + lastName}}
[{ "firstName": "Alice", "lastName": "Smith", "fullName": "Alice Smith" }]deleteWhere — Remove rows matching a condition
where: {{status == "inactive"}}Inverse of filter — rows where the condition is truthy are removed.
updateWhere — Update matching rows
where: {{age < 18}}
set: { "category": "minor" }Rows matching the condition have their fields updated. The set values can also be expressions:
set: { "displayName": "{{firstName + \" \" + lastName}}" }In Tabular Operations, expression errors are handled silently — filter drops the row on error, addColumn sets the field to null, and deleteWhere keeps the row on error (safe default).
Generate CSV
Used in: Pipeline → JSON to CSV utility (with column mappings)
How it works: When generating CSV with custom column mappings, each mapping can contain an expression that is evaluated per row.
Available variables:
- All fields of the current row
Example mapping:
columns:
- header: "Full Name"
expression: "{{firstName}} {{lastName}}"
- header: "Address"
expression: "{{stringify(address)}}"
- header: "Active"
expression: "{{status == \"active\" ? \"Yes\" : \"No\"}}"The stringify function is particularly useful in CSV generation for serializing nested objects into a single CSV cell.
Error behavior: On error, the CSV cell contains the error message string.
Compute Fields
Used in: Pipeline → Compute Fields utility
Important: Compute Fields does NOT use the full expression engine. It uses a simpler regex-based template system with limited capabilities.
How it works: The {{fieldName}} placeholders are replaced with field values via simple string substitution. Then the result is auto-detected as one of three types:
- Conditional:
{{field}} >= value ? "trueResult" : "falseResult" - Math:
{{field1}} * {{field2}}(when all values are numbers) - String template:
{{firstName}} {{lastName}}(default)
What works:
{{firstName}} {{lastName}} → string concatenation
{{price}} * {{quantity}} → math (auto-detected)
{{age}} >= 18 ? "adult" : "minor" → conditional (auto-detected)What does NOT work in Compute (but works elsewhere):
| Feature | Example | Why it fails |
|---|---|---|
| Method calls | {{old.toUpperCase()}} | No old variable, no method call support |
| Built-in functions | {{Math.round(price)}} | Not available — regex substitution only |
| Complex expressions | {{price + tax}} | Single {{...}} with operators not supported |
| Logical operators | {{a && b}} | Only comparison operators in conditional mode |
The key difference: Compute resolves {{field}} to the raw value first, then tries to evaluate the resulting string. The full expression engine parses the expression as an AST and evaluates it with access to all functions and operators.
Comparison table
| Feature | Full Expression Engine | Compute Fields |
|---|---|---|
{{field}} references | Yes | Yes |
Arithmetic (+, -, *, /) | Yes | Only after substitution, math-only |
String methods (.toUpperCase()) | Yes | No |
Math functions (Math.round()) | Yes | No |
| Date functions | Yes | No |
Utility functions (stringify, keys) | Yes | No |
| Conditional ternary | No | Yes (limited pattern) |
Nested field access (a.b.c) | Yes | Yes (dot-path resolution) |
| Comparison operators | Yes | Only in conditional mode |
Logical operators (&&, ||) | Yes | No |
If you need the full expression engine’s power, use Tabular Operations (addColumn) instead of Compute Fields. Tabular Operations uses the full expression evaluator with access to all functions, methods, and operators.