Patch Object
Last updated
Last updated
Use a Patch Object node in your Flow to apply a partial update to a Record of the specified Object Type. The Patch Object node only modifies the specified fields, leaving the rest of the Record unchanged.
Provide an optional Name for the node.
By default a Patch Object node will be shown with a label of "patch object", but the value you provide in the Name field will replace it in the Flow Editor UI making your flow easier to read and understand.
Select a Config for the node.
Note
Select a Type Id for the node, a value specified using one of several options.
type - choose this option for a dropdown that includes the Display Names of the Object Types you have created in your Contextual tenant. If the dropdown appears empty for you, be sure that your Flow has been initialized with a Config, after which the dropdown will be kept in sync with your tenant.
string - choose the string option, and type in a string for the Object Type ID that you want to search, using type is recommended instead of string
msg. - choose this option to specify a path in the msg. object that contains the Object Type ID value that you want to perform the search against, e.g. msg.payload.thePropertyWithTheObjectTypeId
, msg.event.thePropertyWithTheObjectTypeId
, or msg.customObject.thePropertyWithTheObjectTypeId
- the msg. object and its content are available to nodes within any flow in the same Flow Editor window (i.e., across multiple tabs in the Node-RED Flow Editor interface).
flow. - values in the flow.
scope can be set and retrieved by nodes that exist within the same tab of your flow in the Contextual Flow Editor.
global. - values in the .global
scope are shared, and can be set and retrieved, by nodes across any tab of your flow in the Contextual Flow Editor.
env variable - Environmental Variables are a feature of Agents in Contextual. Any Environmental Variables that you define as Label/Value pairs for an Agent that is sending events to a Flow, will be available to the Flow, simply type the Label of the Evironmental Variable from which you want to use the value.
Specify the Input path to the object that contains the details of the Record you want to patch.
Use msg., flow., global., or env variable paths, similar to above
Specify the Output msg. object path for the details of the record that was just patched, to be returned to, e.g. msg.myPatchedRecordDetails
.
When the Patch Object node is included in the path of your flow, it will patch a Record and return its details including _metadata, for further use within your flow as desired.