Optimizing Performance of Advanced Record Lists


If you are displaying a record list for a large table, you can optimize the performance of the record list by constructing an index with the keylist_expression. If you have an index for the keylist_expression, the syntax for the advanced drop-down record list becomes:

[%K=Table,Index_name%.Size VariableName]

The syntax for an advanced list box- record list control is:

[%KL=Table,Index_name%.Size VariableName]

Where Index_name is the name of a special index constructed using the syntax of the keylist_expression. The index definition may also include a filter expression.

For example, the above sample script could be written as:

ui_dlg_box("Print Mail Label",<<%dlg%
Preview mail labels for which customer?;

if a_dlg_button = "ok" then
    filter_expression = "customer_id = '"+key+"'"
end if

Where keylist_index is the name of an index with an order expression of:

keylist_build('1:25,2:25,3:25',customer_id,alltrim(firstname)+' '+lastname, phone, city)


Desktop applications only. Not available in Community Edition.

See Also