QueryRecordHierarchy Collection Methods
In this section, we discuss the QueryRecordHierarchy collection methods. The methods are discussed in alphabetical order.
Syntax
First()
Description
The First method returns the first QueryRecordHierarchy object in the QueryRecordHierarchy collection.
Parameters
None.
Returns
A reference to a QueryRecordHierarchy object if successful, NULL otherwise.
Example
&MyQueryRecordHierarchy = &MyCollection.First();
Syntax
Item(number)
Description
The Item method returns the QueryRecordHierarchy object that exists at the number position in the QueryRecordHierarchy collection.
Parameters
Field or Control |
Definition |
---|---|
Number |
Specify the position number in the collection of the QueryRecordHierarchy object that you want returned. |
Returns
A reference to a QueryRecordHierarchy object if successful, NULL otherwise.
Example
For &I = 1 to &QueryRecordHierarchyColl.Count;
&MyQueryRecordHierarchy = &QueryRecordHierarchyColl.Item(&I);
/* do processing */
End-For;
Syntax
ItemByName(Name)
Description
The ItemByName method returns the QueryRecordHierarchy object with the name Name.
Parameters
Field or Control |
Definition |
---|---|
Name |
Specify the name of an existing QueryRecordHierarchy within the QueryRecordHierarchy collection. If you specify an invalid name, the object is NULL. |
Returns
A reference to a QueryRecordHierarchy object if successful, NULL otherwise.
Example
&MyQueryRecordHierarchy = &MyCollection.ItemByName("PHONELIST");
Syntax
Next()
Description
The Next method returns the next QueryRecordHierarchy object in the QueryRecordHierarchy 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 QueryRecordHierarchy object if successful, NULL otherwise.
Example
&MyQueryRecordHierarchy = &MyCollection.Next();