Record List - Edit Combo Box Control Syntax
Syntax
[%KE= Index_Query_Name % [. Width [, Height ]] Variable_Name [ ! rl_* ][ ? Enabled ] ]
[%@ FormatVariable % [. Width [, Height ]] Variable_Name [ ! rl_* ][ ? Enabled ] ]
Arguments
- Index_Query_Name
Character. The name of the index or query ( query.description ).
- FormatVariable
Character. When combined with "@" allows the control to read its formatting instructions from the variable named FormatVariable.
- Width
Numeric. The width of the control.
- Height
Numeric. The height of the control.
- Variable_Name
Character. The name of a character variable to receive the user selection, or a numeric variable to receive the index value of the selected radio button. The index of the top-most button is 1.
- rl_*
Character. Optional. See Event Syntax.
- Enabled
Logical. Optional. See Enabled Syntax. The control is grayed out when disabled.
Description
The Record List - Edit Combo Box Control provides a dynamic view of selected records and fields from a table or set and allows users to input or edit field values.
Example
For example, the following script creates a combo box based on the query named "Keylist" ( query.description ):
tbl = table.reset("clients")
tbl.query_detach_all()
query.order = "lastname+firstname"
query.filter = ".t."
query.description = "Keylist"
indx = tbl.query_create()
ui_dlg_box("Record List",<<%dlg%
Print a mailing label for which customer?;
{lf};
Select customer lastname:;
%KE=keylist%.50key_selected;
{lf};
<*15&Preview!ok> <15&Cancel!cancel>
%dlg%,<<%code%
if a_dlg_button = "ok" then
filter_expression = "lastname+firstname = '"+key_selected+"'"
label.Preview("mail_labels",filter_expression)
end if
%code%)See Also
