Optimizing Performance of Advanced Record Lists
Description
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?; [%k=clients,keylist_index%.30key]; {lf}; %dlg%,<<%code% if a_dlg_button = "ok" then filter_expression = "customer_id = '"+key+"'" label.Preview("mail_labels",filter_expression) end if %code%)
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)
Limitations
Desktop applications only. Not available in Community Edition.
See Also