xpxSelectAggrElements

FUNCTION xpxSelectAggrElements (aggrId                  : AGGREGATE OF GENERIC;
                                condition               : STRING;
                                options                 : INTEGER;
                                firstIndex, maxHits     : INTEGER;
                                VAR indexOfLastFound    : INTEGER;
                                VAR actualHits          : INTEGER;
                                VAR resultAggrId        : LIST OF INTEGER)
                                status                  : INTEGER;

The xpxSelectAggrElements function produces a list containing the indexes of all the elements of an aggregate that matches a given Express-X logical expression. This function only handles aggregates with primitive data type elements.

Arguments


TypeNameComment
AGGREGATE OF GENERICaggrIdA numeric aggregateID that uniquely identifies the aggregate of interest in the EDMdatabase  This may be any type of aggregate, both persistent and scratch with elements of primitive data types.
STRINGconditionA conditional statement, written in Express-X, that the aggregate elements shall match. References to the element it self is done by the symbol SELF. A string comparing condition may therefore be written
SELF = SCHMIDT or SELF LIKE SCHMIDT
or even
xpxLIKE(SELF, SCHMIDT)
An unset condition, will match all aggregate elements. All symbolic Express-X logical expressions are legal <condition> values. The <condition> argument will be compiled by the EDMexpressXCompiler
INTEGERoptionsNot used.
INTEGERfirstIndexThe aggregate index from which to start searching for matching elements.
INTEGERmaxHitsSpecifies the maximum number of indexes that may be returned in the list.
INTEGERindexOfLastFoundThe index of the last found matching element. This return value enables incremental search for matching elements. See example below.
INTEGERactualHitsThe number of matching elements found.
LIST OF INTEGERresultAggrIdA numeric aggregateID that uniquely identifies the volatile list that will contain the index of each matching element.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_XPX_Return_Value'.

Options


 

Example


firstIndex = 1;
maxHits := 10;
actualHits := maxHits;
 
WHEN (actualHits = maxHits);
BEGIN
  stat := xpxSelectAggrElements(myAggrId, "SELF = SHCMIDT",0, firstIndex, maxHits, lastMatch, actualHits, indexList);
  (* Process matching elements here *)
   firstIndex := lastMatch + 1;
END;

 

See also

Filter by label

There are no items with the selected labels at this time.

   
Â