Comment on page

Update object

The Update object action updates the object class properties of objects in a data source.


This action node is used to programatically update one or more objects in a data source.
To update many objects at once (a batch update) there are two possible methods:
  1. 1.
    Use a While or Foreach action node to iterate over the objects. Add an Update object action node inside the iterator action node with the same data source selected and Object in context as the Selection.
  2. 2.
    Use only the Update object action node. This method is more performant.
When Update object operates on an object it becomes the object in context. This object in context contains the original values prior to the update and these can be accessed using data bindings and functions.
In addition, the values set in the update are available as self properties. Self properties are only available in functions. These can be used to update properties which are dependent on the values of other properties that are being updated in the same operation.


Calculate updated values using self properties
Your app collects orders and each order can have one or more order lines. An order line specifies a Product, a Quantity, a Unit price, and a Total price. When the quantity is changed, you would like the total price to be updated accordingly.
Trigger an action when the quantity is changed that uses Update object to update the relevant order line object. For Total price set a new value using a function. Add Quantity and Unit price as function parameters from self-properties and use the function return quantity * unitPrice;.


Data Source
Select a data source that contains the object(s) to update.
Available if the selected Data Source is a many-cardinality data source. Define the objects to update.
Available when Selection is Filtered selection. Define the filter to apply to the data source.
Values on update
Set new values for any object class properties in the defined object(s).