Skip to main content
Skip table of contents

f$PGSort


f$PGSort

Sort a 1-dimension parameter group by one or more parameters. Groups can be sorted to ascending or descending as desired. The number of datasets to be sorted is limited by the content of the first sorting column. If a parameter with UNDEF or NOVAL state is found in this column, this index is used as end criterion for sorting.

Please note: the parameter group may not contain any indexed parameters.

Please note: the name of the parameter group is usually given in string constants, i.e. in quotation marks.

Syntax:

Status = f$PGSort( PGName, Fieldlist [,Endcriterion] )

 

Argument

Type

Meaning

 

PGName

String

Name of the parameter group to be sorted

 

Fieldlist

String

List of parameters in the parameter group by which the group is to be sorted. If the field name has been given a – at the end of its name, this column is sorted descendingly. The symbol , separates parameter names. Spaces between names are not allowed.

 

Endcriterion

Integer

Indicator for if parameters in NOVAL state are also used as a limit for sorting:
1 – Noval parameters are used as end criterion
0 – only parameters in UNDEF state are used as end criterion.
This parameter is optional. If the parameter is not entered, 0 is used.

Result:

Integer

0 : everything ok

-1 : the parameter group does not exist

-2 : the parameter group is not indexed

-3 : parameter not found

Example:

Status = f$PGSort ('Addresses','CountryCode,ZipCode-,PreferredName')

In this example, the list of addresses is first sorted according to country code. All addresses in the same country are sorted after zip code in descending order. The addresses within a zip code are sorted according to name in ascending order.

JavaScript errors detected

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

If this problem persists, please contact our support.