FORM SET LIST
Documentation | Blog | Demos | Support
FORM SET LIST
5 out of 5 stars
1 rating
5 Stars | 100% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
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
formfield | A form field in the current form or display. Formfield must be a list box or combo box. |
expression | The 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
formfield | A form field in the current form or display. Formfield must be a list box or combo box. |
num | The 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. |
setspec | A 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. |
expression | Any 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
5 out of 5 stars
1 rating
5 Stars | 100% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |