Comment on page
This action node is used to populate runtime-only data sources with objects as needed during runtime. Read objects adds an exact copy of an object in the target data source – it is the same object as in the source data source (or the database) with the same ID. To instead duplicate an object, use Duplicate objects.
A common use case for Read objects is to copy an object for editing. As it is copied to a runtime-only data source any changes only exist in the client user's session until they are persisted.
Read objects can also be used to improve performance by only populating a data source when it will be used. The objects can be added directly from the database, but if the required objects are already present in another data source reading them from there will be more performant.
Edit an existing object
Your app manages the various products you have for sale. All the products are accessed and updated via a database-connected data source. When you edit a product, the change is immediately stored in the database. Instead, you'd like to be able to edit a product but then choose to cancel or save the changes.
To do this, trigger an action when you want to edit a product that uses Read objects to read that product object into a runtime-only, single-cardinality data source. Adjust the edit UI to be bound to the properties in this new data source and add a
When the Cancel button is clicked, just navigate back to the previous view. The changes will still exist in the runtime-only data source but will not be saved in the database. Optionally, run a Delete objects action node to remove the project object (and all the changes) from the runtime-only data source.