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