Comment on page
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:
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
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 priceset a new value using a function. Add
Unit priceas function parameters from self-properties and use the function
return quantity * unitPrice;.