QueryList Class Methods

In this section, we discuss the QueryList class methods. The methods are discussed in alphabetical order.

Syntax

AddListValue(Value, IsPrompt)

Description

The AddListValue method adds a new List Value into the QueryList instance.

Parameters

Field or Control

Definition

Value

Specify the string value to be added to the list

IsPrompt

Specify whether the string specified by Value is a bind variable. This parameter takes a Boolean value: True, Value is a bind variable.

Returns

A reference to a QueryListValue object if successful, NULL otherwise.

Example

&MyListValue = &MyList.AddListValue("1", False);

Syntax

First()

Description

The First method returns the first QueryListValue object in the QueryList instance.

Parameters

None.

Returns

A reference to a QueryListValue object if successful, NULL otherwise.

Example

&MyListValue = &MyList.First();

Syntax

Item(number)

Description

The Item method returns the QueryListValue object that exists at the number position in the QueryList instance.

Parameters

Field or Control

Definition

Number

Specify the position number in the QueryList object that you want returned.

Returns

A reference to a QueryListValue object if successful, NULL otherwise.

Example

For &I = 1 to &QueryList.Count; 
   &QryListVal = & QueryList.Item(&I); 
   /* do processing */ 
End-For;

Syntax

Next()

Description

The Next method returns the next QueryListValue object in the QueryList instance. This method should be called after calling First, else it returns NULL.

Parameters

None.

Returns

A reference to a QueryListValue object if successful, NULL otherwise.

Example

&MyNextListValue = &MyList.Next();