Skip to content

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

PropertyTypeDefaultDescription
fieldNamestring--Required. The name of the field to set.
expressionstring--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

VariableDescription
rowThe current row being processed
inputSame 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 Row

Compute a display field

Table Query --> Set Field (fieldName: "display_price", expression: "'$' ~ number_format(row.price, 2)") --> Result

Enrich rows with computed values

Table Query --> Set Field (fieldName: "age_days", expression: "...") --> Result

TIP

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.