Customizing the Lookup List
When a foreign key (a field that relates the currently edited record into a form with another's table record) is displayed, then automatically a lookup list is displayed. This automatically created list contains from the related table not only the lookup field but also any other fields of the related table that are displayed also on the form.
For example, the following snippet of code does the customization:
start_sql "EID_SEL" "KOSMOS"
SELECT PRODUCT.DESCR, PRODCUT.P_ID AS RMAT, PRODUCT.APRICE2,
WHERE (((EIDH0.PERIGR) Like :E & "%")
ORDER BY EIDH0.PERIGR