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