Skip to main content

UpdateRecordArrayItem@1

Node UpdateRecordArrayItem@1 finds one record in a RecordArray by a key attribute, sets attribute values on it and writes the modified array to targetPath. If no record matches, nothing is written.

To update several records of one array in one pass (for example to store a batch of changes with one read and one write per entity), use UpdateRecordArrayItem@2.

Not safe under parallel executions

Reading an entity, changing one record with this node and writing the whole array back loses the changes of other executions that run at the same time. If several executions can change records of the same entity in parallel, use the atomic item update of CreateUpdateInfo@1 instead.

Node Configuration​

For fields path, targetPath, targetValueWriteMode, targetValueKind and documentMode, see Overview.

transformations:
- type: UpdateRecordArrayItem@1
path: $.key.Attributes.States
matchAttributeName: ExternalId
matchValuePath: $.full.key.pollUuid # or matchValue: <static value>
targetPath: $.updates._updatedStates
attributeUpdates:
- attributeName: CurrentValue
valuePath: $.full.key.value
- attributeName: LastUpdate
value: =now()

Parameters​

ParameterTypeRequiredDescription
pathstringYesJSON path to the RecordArray
matchAttributeNamestringYesName of the record attribute to match
matchValuestringNoStatic value to match
matchValuePathstringNoJSON path to the value to match. Takes precedence over matchValue
attributeUpdateslistYesattributeName plus valuePath (absolute JSON path) or value (static; =now() sets the current UTC time)
targetPathstringYesJSON path where the modified array is written