Skip to main content

Modify Object In Array

This node updates a specific property of an object within an array.

The Modify Object In Array node allows for precise data updates using an Object ID.

The Modify Object In Array node finds an object by its Object Id (which can be anywhere in the system, usually part of an array) and updates a specific property defined by Key Path with a New Value.

Inputs

Input

DataDescription
Object IdThe unique ID of the object to modify.
New ValueThe value to write to the property.

Object Options

DataDescription
Key PathThe property to update (e.g., "status", "user.name").

Actions

SignalDescription
DoTriggers the modification.

Outputs

Output

DataDescription
Modified ObjectThe updated object.
Original ValueThe value of the property before the change.
New ValueThe value that was written.

Events

SignalDescription
DoneTriggered when the update is complete.
FailureTriggered if the object ID is not found or key path is invalid.

Usage

Use this to edit data, such as marking a task as complete or changing a user's name.

Example Use Cases

  1. Checkbox in List:
    • Inside a Repeater (Task Item).
    • Connect Checkbox value to New Value.
    • Connect Item ID to Object Id.
    • Set Key Path to "completed".
    • Trigger Do on Checkbox change.
  2. Edit Form: Update a user's profile data.

Detailed Behavior

  1. Global Update: Because XFORGE uses a centralized model system, updating the object here will automatically update it in any Array or Repeater that references it. You do not need to "save" it back to the array.
  2. Deep Keys: Supports "nested.keys".

Troubleshooting

  • Object Not Found: Ensure the Object Id is correct.
  • No Visual Change: If the data updates but the UI doesn't, ensure your UI components are bound to the correct model properties.