Appearance
Set Field
The Set Field node adds a new field or overwrites an existing field on each row using an expression. Use it to compute derived values, inject timestamps, or merge data from other sources.
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
fieldName | string | -- | Required. The name of the field to set. |
expression | string | -- | Required. An expression that computes the field value. The row variable refers to the current row. |
Input
Accepts a single object or an array of rows.
Output
Returns the same structure with the new field added to each row. All existing fields are preserved.
Expression Context
| Variable | Description |
|---|---|
row | The current row being processed |
input | Same as row (for single-object input) |
Example Configurations
Set a timestamp
fieldName: "created_at"
expression: "now()"Compute a total
fieldName: "total"
expression: "row.price * row.quantity"Inject the current user's ID
fieldName: "user_id"
expression: "user_meta('ID')"Build a full name
fieldName: "full_name"
expression: "row.first_name ~ ' ' ~ row.last_name"Set a default status
fieldName: "status"
expression: "'pending'"Conditional value
fieldName: "label"
expression: "row.price > 100 ? 'Premium' : 'Standard'"Example Use Cases
Add metadata before saving
In a form submission pipeline, add system fields before the Save Row node:
Context --> Set Field (created_at = now()) --> Set Field (user_id = ...) --> Validate --> Save RowCompute a display field
Table Query --> Set Field (fieldName: "display_price", expression: "'$' ~ number_format(row.price, 2)") --> ResultEnrich rows with computed values
Table Query --> Set Field (fieldName: "age_days", expression: "...") --> ResultTIP
Set Field preserves all existing fields and only adds or overwrites the specified field. To replace the entire row structure, use the Mapping node instead.