FORM SET LIST

FORM SET LIST

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

FORM SET LIST

Sets the contents of a list box or combo box form field.

Syntax #1

Sets the contents of a list box or combo box from the value of an expression.

FORM SET LIST formfield LIST expression

Parameters

formfieldA form field in the current form or display. Formfield must be a list box or combo box.
expressionThe expression whose value is used to set the contents of each list box or combo box item. Expression is a character string, or an expression that evaluates to a character string. Each item in expression must be separated from the next by a semicolon.

Syntax #2

Sets the contents of a list box or combo box from a set.

FORM SET LIST formfield \

FROM [ num ] [ setspec ]\

[FORMAT expression]

Parameters

formfieldA form field in the current form or display. Formfield must be a list box or combo box.
numThe number of items to be set in the list box or combo box. Num can be
an integer constant (e.g., 15, 200),
a variable, form field, menu item, or formal parameter that evaluates to an integer,
the word ALL.
The default value for num is ALL.
setspecA set specification whose members are used to set the contents of the list box or combo box. If setspec is omitted, the current set is used, if it exists.
expressionAny expression. For each member of setspec (up to num members), the value of expression is determined and used as one item in the list or combo box. Expr2 can use fields in setspec. FORMAT expression can be omitted if setspec is an unstructured application document; in this case, num records from the application document are used as the list items.

Note: When you  populate the list box from a set, all data is left-justified, regardless of data type.

Example

form set list fCustomer.StateTab from states sorted by StCode \

format $ concat(StCode, ” “, StDesc)

Sets the contents of a list box to a two-character state code followed by the state name.

form set list fCDLFind.FieldName \

list ” ProdCode ; ProdDesc ; UnitPrice ; QOH ; MinQty”

Sets the contents of a combo box to field names specified in a string.

See Also

CHANGE

FORM DISPLAY

FORM INPUT

LET

Was this article helpful?
5 out of 5 stars

1 rating

5 Stars 100%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese