KEYLIST_BUILD()

Syntax

Output_String as C = KEYLIST_BUILD( Keylist_Format as C, Return_Value as C, column1 as C [,   column2 as C ] ... )

Argument

Description

Keylist_Format

A comma delimited character string of format:

Column_Number : Width [ Column_Heading ]

For example: "1:30,2:20,3:15". In this example there are 3 columns of width 30, 20 and 15 respectively.

Argument

Type

Description

Column_Number

N

The sequence number of the column.

Width

N

The width of the column in characters.

Column_Heading

C

Optional. The column heading.

Return_Value

The name of the field to be returned when a record is selected.

column1 ... columnN

The names of the fields to display and Xdialog formatting information. The format is: Column1_expression, column2_expression, … columnN_expression.

Description

The KEYLIST_BUILD() function returns specially formatted data for display of advanced record lists in an Xdialog form. The syntax for an advanced record list-combo box control is: [%K = Table, {Keylist_Expression}{Filter_Expression}%.Size VariableName] where Keylist_Expression defines the order of the data in the record list and the columns in the record list. The Keylist_Expression uses KEYLIST_BUILD() to define:.

For more information, please refer to Learning Xdialog.

Supported By

Alpha Five Version 5 and Above

Example

keylist_build('h=.025,1:15[Lastname], 2:15[Firstname], 3:20[Address], 4:15[City], 5:5[St], 6:6[Zip]', lastname, lastname, firstname, address, city, state, zip)

Note : If you want to use a variable in a KEYLIST_BUILD() expression, because the KEYLIST_BUILD() function is embedded in an Xdialog definition, the resulting code must be structured like the following.

dim dialog_code as C

dialog_code = <<%dlg%

...xdialog code...

keylist_build(...

%dlg% + variable + <<%dlg%

...)

...xdialog code...

%dlg%

ui_dlg_box("Title",dialog_code,<<%code%

...event handling code...

%code%)

See Also

Xdialog Function Reference, Index Functions and Methods