Last October I posted an example and description of a
common_lookup
table. It was intended to show how
common_lookup
tables support drop down selections in
web forms. However, it wasn’t adequate to show how they work with
existing data, and the function only supported fresh queries.
This post goes to the next level, and shows how to use foreign keys to preselect values for display in web forms. It also rewrites the prior function so that it supports querying existing data and inserting new data.
Let’s start with data stored in join between two tables – the
member
and contact
tables. The internal
lookup uses the customers name from the contact
table to find the membership account information in the
member
table.
1 2 … |