Customizing the Lookup List

  • Edit

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:

 

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