Load data object
The Load data object action loads (or creates) an entity instance and attaches it to the form, optionally filling specified properties. It searches using a query; if a matching data object is found its data (and child relationships) are attached to the form. If not found and configured, a new instance is created, populated from evaluated expressions, and attached.
Properties and Explanation Here are the steps to follow in order to use the Load data object action:
Select Data Object: Choose the data object (entity) container to load. This selects which entity class and container form the action targets.
Select Relationship (if any): Choose a relationship within the selected data object, or "None" to operate on the main entity. When a relationship is selected, the action targets the related entity (or creates a related child) instead of the main entity.
Filter: Provide the query or formula used to locate existing instances. The Query uses the Formula Editor and is evaluated at runtime; the first matching result (or the single result) is used to attach to the form.
Create new if not found: If enabled and the Query finds no match, the action will create a new instance of the entity (or related child), assign it a temporary id, and attach it to the form.
Full Configuration Example Below is a screenshot of the Load data object action configuration, showing all properties set for Select (dataobject), Select (relationship), Filter, and Create new if not found:
Select (dataobject): Invoice
Select (relationship): None
Filter: InvoiceNumber == ${invoiceNumberField}
Create new if not found: Checke
In this example, the action evaluates the Filter (Query) and:
If an Invoice is found, that Invoice is attached to the form and any child relationships are also attached to their sub-forms.
If not found, a new Invoice is created, the specified DataFields are evaluated and set, and the new instance is attached to the form.
Last updated