QueryExpression Collection Methods
In this section, we discuss the QueryExpression collection methods. The methods are described in alphabetical order.
Syntax
First()
Description
The First method returns the first QueryExpression object in the QueryExpression collection.
Parameters
None.
Returns
A reference to a QueryExpression object if successful, NULL otherwise.
Example
&MyQueryExpression = &MyCollection.First();
Syntax
Item(number)
Description
The Item method returns the QueryExpression object that exists at the number position in the QueryExpression collection.
Parameters
Field or Control |
Definition |
---|---|
Number |
Specify the position number in the collection of the QueryExpression object that you want returned. |
Returns
A reference to a QueryExpression object if successful, NULL otherwise.
Example
For &I = 1 to &QueryExpressionColl.Count;
&MyQueryExpression = &QueryExpressionColl.Item(&I);
/* do processing */
End-For;
Syntax
ItemByName(ExpressionName)
Description
The ItemByName method returns the QueryExpression object in the QueryExpressionCollection with the given expression name.
Parameters
Field or Control |
Definition |
---|---|
ExpressionName |
The name of the required expression. |
Returns
A reference to a QueryExpression object if successful, NULL otherwise.
Example
&QryExpr = &QryExprCol.Item("Exp-6");
Syntax
Next()
Description
The Next method returns the next QueryExpression object in the QueryExpression collection. You can use this method only after you have used the First method: otherwise the system doesn’t know where to start.
Parameters
None.
Returns
A reference to a QueryExpression object if successful, NULL otherwise.
Example
&MyQueryExpression = &MyCollection.Next();