Customizing the Lookup List

When a foreing key (a field that relates the currently edited record into a form with anothers talbe record) is displayed, then automaticaly a lookup list is displayed. This automaticaly created list contains from the related table not only the lookuped field but also any other fields of the related table that are displayed also on the form.

For example the following sniped of code does the customization:

 

proc Form_Start()

     start_sql "EID_SEL" "KOSMOS"
        SELECT PRODUCT.DESCR, PRODCUT.P_ID AS RMAT, PRODUCT.APRICE2,
        PRODUCT.APRICE
        FROM PRODUCT       

        WHERE (((EIDH0.PERIGR) Like :E & "%")
        AND ((EIDH0_AYL_PRICE.IS_VALID)="1"))
        ORDER BY EIDH0.PERIGR
     end_sql


end