Skip to main content
Skip table of contents

f$PGIndex


f$PGIndex

Find a 1-dimension parameter group’s index belonging to the parameter value Value. All indices from 1 to the given number are searched over in a parameter of the parameter group. If 0 is given as the number, the search continues to the end of the parameter group. The defined size of the parameter group is detected during this. Thus it is not necessary to alter the function call if the indexation has been changed. According to the mode set to, the search ends upon the first entry found in NOVAL or UNDEF state.

Syntax:

Index = f$PGIndex (Value, PGName, Fieldname, Count, Mode [,Startindex] )

 

Argument

Type

Meaning

 

Value

String

Value to be searched for

 

PGName

String

Name of the 1-dimension parameter group to be searched through

 

Fieldname

String

Name of the parameter in the parameter group to be searched through

 

Count

Integer

Number of indices in the parameter group to be searched through or 0.

 

Mode

Integer

Manages the stop criterion for the search:

0 : the search continues until Count or the detected number of entries.

1: the search ends at the first value in UNDEF state.

2: the search ends at the first value in UNDEF or NOVAL state.

 

StartIndex

Integer

Index in the parameter group at which the search is to begin. This parameter is optional

Result:

Integer

Index in the parameter group at which the value of the parameter Fieldname contains the value searched for. If the value is not found, –1 is returned as the result. Furthermore, the following error statuses are possible:

-2 : parameter group does not exist

-3 : parameter does not exist

-4 : parameter is not of string type

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.