xpxSelectAggrInstances
FUNCTION xpxSelectAggrInstances (aggrId : AGGREGATE OF GENERIC; condition : STRING; options : INTEGER; firstIndex, maxHits : INTEGER; VAR indexOfLastFound : INTEGER; VAR actualHits : INTEGER; VAR foundInstances : AGGREGATE OF GENERIC) status : INTEGER;
The xpxSelectAggrInstances function returns a list containing the indexes of all the instances within an aggregate that matches a given Express-X logical expression.
Arguments
1 | Type | Name | Comment |
2 | AGGREGATE OF GENERIC | aggrId | A numeric aggregateID that uniquely identifies the aggregate of interest in the EDMdatabase. This may be any type of aggregate, persistent, volatile or scratch. |
3 | STRING | condition | A conditional statement, written in Express-X, that the instances shall match. |
4 | INTEGER | options | Not used. |
5 | INTEGER | firstIndex | The aggregate index from which to start searching for matching instances. |
6 | INTEGER | maxHits | Specifies the maximum number of matching instances to return. |
7 | INTEGER | indexOfLastFound | The index of the last found matching instance element. This return value enables incremental search for matching elements. See example below. |
8 | INTEGER | actualHits | The number of matching instances found. |
9 | AGGREGATE OF GENERIC | foundInstances | Return value. A numeric aggregateID that uniquely identifies the volatile list that will contain the index of each matching instance. |
Return Value
Options
Â
Example
firstIndex = 1; maxHits := 10; actualHits := maxHits; WHEN (actualHits = maxHits); BEGIN indexList := xpfSelectAggrInstances(myAggrId, "(NAME LIKE JOHN%) AND (AGE > 30)" 0, firstIndex, maxHits, lastMatch, actualHits,); (* Process matching elements here *) firstIndex := lastMatch + 1; END;
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â
Â