FILLBOX
Syntax
![]()
Command
Mandatory parameter Optional parameter Mandatory keyword Optional keyword |
FILLBOX (<Fieldname>, <Value>)
Description
With the FILLBOX statement, you can fill listboxes or comboboxes through a text file instead of doing this directly through the memory. This is only supported if the MemoryBased property has been set to false. Other than with the ATTACHTOBOX command, the file is created and maintained by AMT automatically.
Diagram
Returned value type
None
Parameters
Parameter | Description |
<Fieldname> |
The name and location of a layout control element. The syntax for a fieldname is as follows:
<Formname> is the name of the form. Instead of a specific formname, the asterisk (*) can be specified to assign all forms. <Layout fieldname> is the name of the listbox or combobox within the specific form or all the forms (depending on <Formname>) to which the values are inserted. |
<Value> | Expression giving the string to assign one or more columns to the specified listbox(es) or combobox(es).
The syntax to specify a single row is as follows: <Delimiter>' + <Item value> + '<Delimiter>' + <Itemname> <Delimiter> |
Remarks
To assign multiple columns or rows within the specification, delimiters are used. Note that each row in a box item
is first filled with a value that is used within the program (column that is referred to by the property ValueSend
of the box item) and one or more items that is/are shown to the user (column that is referred to by the property
ItemsDisplayed of the box item).
This command is normally used in combination with the LOOP...ENDLOOP command.
The fieldname is defined as '*.combo_cntry_code', to allow the file to automatically populate any list/combo boxes with the same name in other forms. Due to the fact that an asterisk can actually not be used in a windows file name, the actual name of the file created will be an underscore and the extension will be the field name specified, e.g. '_.combo_cntry_code'.
The encoding of the listbox file created by the fillbox command is either ASCII or Unicode, depending on the application option 'Define Unicode for all extracted files'.
When specifying an empty string in the fillbox command (e.g. fillbox ('*.combo_cntry_code', '') ), the listboxfile will be removed and the list/combobox will show empty.
By default listbox files are available to all users, this behaviour can be changed with the Application option: 'Create listbox file only in Station folder with Fillbox'.
Example
loop for teller := 1 to 5
name-2 := '|' + teller + '|' + teller + ' aha'
fillbox ('FORM_BOXES.' + '02' + 'combo_cntry_code', name-2)
endloop