This page provides an example of handling many-to-many relationship when the junction table (sometimes referred to as a "bridge table", "join table", "association table", or "cross-reference table") contains exactly two columnns that both are foreign keys for other tables. In this case you can define a simple custom template with a multi-selection control (Checkbox Group or Multiple Select) to create an intuitive and easy-to-use interface that allows users to add/remove records to/from the junction table transparently (they will not even suspect its existence).

Technical details are as follows (click a link below to see the appropriate code):

- OnGetCustomTemplate event handler code
- OnAfterInsertRecord event handler code
- OnAfterUpdateRecord event handler code
- Custom form template (based on forms/form.tpl).

Open Insert or Edit forms to see this solution in action.