Pattern 7: Classic Foreign Key Dropdown List

Previous Next

See Also

In this design pattern, a page contains a dropdown list for a foreign key column.

In the Definer, you can change the Lookup Method attribute of a relationship from Lookup Page (the default) to Dropdown List or Radio. This results in the appropriate lookup functionality automatically. That is:

· The info page corresponding with the child table now contains an additional DropDown DataSource element, for example:


· This DataSource contains a Lookup element with the Synchronization DataSource property set to the path to the child table, for example:


This specifies that the foreign key values to be selected in the dropdown list are synchronized with the primary key values in the parent table.

· This Lookup element has LookupColumns for all key columns. The Synchronization Column property is set to the corresponding foreign key column.


· Instead of TextColumnControls, there are now SelectColumnControls displayed in the object tree, both in the SearchGroup, and in the ResultGroup.

In some cases, you want to implement dropdown list or radio button lookup functionality for a field without making conceptual changes at relationship level. There are two situations here:

· There exists a conceptual relationship, but you don't want to make changes at generic (Definer) level.


· There is no conceptual relationship at all, for example when there is a system table with domain-like values that you want to present in a dropdown list.

Both scenarios are worked out in a related topic.

Related Topics:

How to Change a Foreign Key field into a Dropdown List

How to Change a Non-Foreign Key Field into a Dropdown List