Retrieve

2 minutes to read Download PDF Edit

Retrieve can be used to get one (or more) associated objects of another object. Furthermore the activity can also get one (or more) objects directly from the database.

Action Properties

Retrieve type

Retrieve type defines the way the objects are retrieved.

Option Description
Association Retrieve the object(s) associated to an object by following an association. Changes to the association that have not been committed to the database can be retrieved only by using this type of retrieval.
From database Retrieve objects from the database.

Retrieve By Association Properties

Association

This property specifies which association will be followed. The association must be an association from an object that is already available in a variable. Associations can be followed in both directions.

Retrieve From Database Properties

Entity

The entity of which to retrieve instances (objects).

Range

The range determines how many objects are retrieved.

Range Meaning
All Retrieve all objects at once.
First Retrieve only the first object. The result of the retrieve action will be a single object instead of a list.
Custom Retrieve a given number of objects (limit) starting at a given index (offset). Limit and offset are microflow expressions that should result in a number. Note: the first object has offset 0.

XPath constraint

XPath constraint defines the condition the objects need to suffice to be retrieved. If there is no XPath constraint, all objects of the entity are retrieved.

Sorting

Sorting defines the order of the list. The list can be sorted in ascending and descending order on the values of an attribute. If there are objects that have the same attribute value the list is sorted based on the second attribute (if any) and so on.

Output Properties

Variable name

Variable name defines the name of the result list or object variable. It can be used by all activities that follow this activity.

Copyright © Mendix. All rights reserved. | Mendix.com | Terms of Use | Privacy Policy