change
Sets or deletes one value, on the message or in a flow variable, then passes the message on.
Properties
- operation —
setordelete. Defaultset. - target —
msg propertyorflow variable. Defaultmsg property. - property / name — the message property or flow variable to change. Default
payload. Required. A leadingmsg.orflow.is dropped. The name is one top-level key:payload.tempnames a property calledpayload.temp, nottempinsidepayload. - value from — with
set:a literal value,another msg propertyora flow variable. Defaulta literal value. - literal type — with a literal:
string,numberorbool. Defaultstring. - value / source property — with
set: the literal, or the name of the message property or flow variable to copy. Default empty. A literal is read as the literal type (see Typed values).
Wiring
Input — any message.
Output — the same message, changed when the target is a message property.
Behavior
One rule per node. Chain change nodes for more than one change.
A flow variable is shared by name with every other change node and with a function node's
flow.get and flow.set. There is no node-private store here; use a function node's context for that.
Copying a property or flow variable that doesn't exist sets the target to None. Deleting one that doesn't exist
does nothing.
Errors
These stop the deploy:
- No property or flow variable name:
change needs a property or variable name. - No source name when copying:
change needs a source property or variable name. - A
numberliteral that isn't a number:change value "abc" is not a valid number.