Using a Coded Lookup Field
A coded lookup field stores one field while displaying another. The Invoice form shows an example of the value of coded lookup fields in its embedded browse. The left-most column of the browse displays the description field from the invoice_items table. This effect is achieved through Field Rules. This is how it was done in the AlphaSports sample database:
Open the Field Rules for the invoice_items table.
Display the Lookup tab the product_id field.
Set Lookup styles to "Table lookup".
Set the Table field to the name of the table that will provide the field to display.
In Linking Field select the field that connects the invoice_items table to the product table. This is the product_id field.
Enter the expression that will order the entries in Display Order field. This is not strictly necessary, but since the description field will be displayed, it makes sense to sort the entries alphabetically.
If there was a reason not to display all description fields that match product_id fields, you could also have a filter expression in the Filter field. [Picture]
Enter the linking field from the product (source) table in the first row of the Source column.
Enter the linking field from the invoice_items (destination) table in the first row of the Fill column.
Set Display to "No".
Enter the display field from the product (source) table in the second row of the Source column.
Since you are not saving the description field in the invoice_items table, there is no entry in the Fill column.
Set Display to "Yes".
Check the Display as Drop-down list box check box. [Picture]
Objects That Do Table Lookups
Alpha Five Version 5 and Above