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.
| Data | Description |
|---|
| Object Id | The unique ID of the object to modify. |
| New Value | The value to write to the property. |
Object Options
| Data | Description |
|---|
| Key Path | The property to update (e.g., "status", "user.name"). |
Actions
| Signal | Description |
|---|
| Do | Triggers the modification. |
Outputs
Output
| Data | Description |
|---|
| Modified Object | The updated object. |
| Original Value | The value of the property before the change. |
| New Value | The value that was written. |
Events
| Signal | Description |
|---|
| Done | Triggered when the update is complete. |
| Failure | Triggered 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
- 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.
- Edit Form: Update a user's profile data.
Detailed Behavior
- 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.
- 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.