Skip to main content

Join Page

Last updated 30/01/2026

Definition

A Join page is used to define and manage relationships between multiple data sources within the single page. It allows you to configure foreign relationships using Boolean switches to control how related records are included, and to extend the joined result by adding extra fields as required. This provides flexibility in shaping how data is linked, displayed, and interacted with, without altering the underlying data sources.

At the database-level, a Join page is typically backed by a three-table relationship, where a middle (join) table stores the foreign keys that reference two primary tables. This structure is commonly used to model many-to-many relationships.

Understanding Join Pages and Many-to-Many Relationships

To use a Join page, your database must model a many-to-many relationship.

A many-to-many relationship exists when:

  • One record in a table can be linked to many records in another table, and
  • Those records can also link back to many records in the first table
Example: Employees and Departments

The diagram below shows the relationship between the Employee, EmployeeDepartment, and Department tables.

  • An employee can work in multiple departments
  • A department can have multiple employees

WorkForce Hub database model
Figure 1 - WorkForce Hub database model

This many-to-many relationship requires a join table (EmployeeDepartment). The join table resolves the many-to-many relationship by breaking it into two one-to-many relationships:

  • One employee -> many join records
  • One department -> many join records

The join table stores the primary key from the Employee table as a foreign key and the primary key from the Department table as a foreign key. Each record in the middle table represents one relationship between an employee and a department. This structure allows the Join page to:

  • Accurately link records across tables
  • Expose related fields from multiple tables
  • Control relationship behavior using join configuration options

Referencing a Form

Boolean switches on a join form allow you to control how relationships behave. To enable and configure these switches, the Join page must reference the associated join form. The join form defines the underlying relationship between the primary table and the join table, including the join keys, relationship type, and any extra fields.

How it works:
  1. The join form defines the relationship.
    • Specifies which tables are connected
    • Maps the fields used to link the tables
    • Provides configuration options for extra fields
  1. Join page references the join form.
    • The UI reads the relationship details from the form
    • Boolean switches become available to modify join behavior without changing the database structure
  1. Switch behavior.
    • Include unmatched primary rows, controls whether rows with no matching join record appear
    • Require foreign record, ensures only rows with a linked foreign record are included
    • Enable relationship, turns the join on or off dynamically

How to Add a Join Page

Use Case Example

This example demonstrates how an Employees form can include a Join page for Departments, allowing users to associate an employee with one or more departments. The Join page provides a structured way to manage the relationship between employees and departments, ensuring department data is linked consistenetly without duplicating information. This approach keeps the form organized while supporting clear, maintainable data relationships.

To support linking employees to departments, three forms are added:

  • Departments
  • Employees
  • EmployeeDepartments

The EmployeeDepartments form acts as a join form, enabling employees to be assigned to one or more departments.

First Form

The first form added is the Departments form, which stores and manages department information. This form provides the foundational data that will later be linked to employees through a join form. The Departments form has been added into Five via Five's Form Wizard.

The image below shows the form field on the Departments form. It only has a Name field which is used to enter the department name.


Departments form field
Figure 2 - Departments form field

Second Form

The second form added is the Employees form, which stores and manages employee information. This form represents individual employees and provides the core records that will later be linked to departments through a join form (EmployeeDepartments).

The image below shows the form fields on the Employees form.


Employees form fields
Figure 3 - Employees form fields

Add a Join Form

The EmployeeDepartments form is added as a join form to manage the relationship between employees and departments. It links employee records, enabling employees to be assigned to one or more departments. This form will be added via Five's Form Wizard.

1. Select Visual in the menu followed by Form Wizard in the sub-menu.


Form Wizard menu item
Figure 4 - Form Wizard menu item

2. Select EmployeeDepartment in the Main Data Source field.

3. Click the Add Menu Item switch.

info
No menu item is required for this form as it will become the Join page on the Employees form.

Add Employee Departments form
Figure 5 - Add Employee Departments form

4. Click the Next button.


Next button
Figure 6 - Next button

5. Click the List checkbox for the DepartmentKey field.

tip
Both foreign key fields in the join form need to be included in the list for the join page to work correctly!

List checkbox
Figure 7 - List checkbox

6. Click the Save button in the Form Wizard app bar.


Save button
Figure 8 - Save button

Add a Join Page

The Employees form is updated to include a Join page for EmployeeDepartments, allowing departments to be added and managed directly from an employee record. This Join page provides a clear interface for associating employees with one or more departments.

1. Select Visual in the menu followed by Forms in the sub-menu.


Forms menu item
Figure 9 - Forms menu item

2. Select the Employees record in the list and click the Pages tab.


Pages tab
Figure 10 - Pages tab

3. Click the Add Pages button.


Add Pages button
Figure 11 - Add Pages button

4. Type Departments in the Caption field.

5. Select Join in the Page Type field.

6. Select EmployeeDepartments (Form) in the Action field.


Add Departments page
Figure 12 - Add Departments page

7. Click the Save button in the form app bar.


Save button
Figure 13 - Save button

8. Click the Save button in the form app bar above the list.


Save button
Figure 14 - Save button

In Application

To make departments available on the Departments page as switches, add each department as a record on the Departments form. Each record represents a single department. Once created, these department records appear on the Departments page and can be selected as on/off when assigning departments to an employee.

Adding New Department Records

1. Select Departments in the menu.

2. Click the Add Item button.

3. Give the department a name.

4. Click the Save button in the form app bar.


Department records
Figure 15 - Department records

Assigning Departments to an Employee

The Join page can be reached by selecting Employees in the menu and creating a new record or selecting a record in the list and clicking the tab (Departments) that holds your Join page.

1. Open an Employee record and click the Departments tab.


Departments tab
Figure 16 - Departments tab

2. Assign departments to employees by clicking the switches.


Join page
Figure 17 - Join page

3. Click the Save button in the form app bar.


Save button
Figure 18 - Save button

Adding Extra Fields to a Join Page

A join form can be customized by adding extra fields to capture additional information about the relationship between employees and departments. These fields allow you to store data specific to each employee-department relationship, such as their role, start date, contactable after hours, without modifying the core employee or department records. Adding extra fields ensures that all relevant details about the association are tracked in a single, maintainable location.

In the previous documentation, the Employees form currently includes a Join page called Departments, which is used to assign one or more departments to an employee. This allows employees to be linked to the relevant departments they belong to.

To extend the information captured for each employee, an additional field called After Hours Contact will be added. This field is used to store details indicating whether the employee is contactable outside of standard business hours, and how they can be reached if required.

Edit the Join Table

note
Of course, if you know you want extra fields on your Join table when originally adding the table, you can add the extra fields in the Table Wizard.

To support additional employee contact information, the EmployeeDepartment table will be updated to include a new field called AfterHoursContact. This field will be used at the form-level to capture and display details indicating whether an employee is contactable outside of standard business hours when assigned to a department.

1. Select Visual in the menu followed by Tables in the sub-menu.


Tables menu item
Figure 19 - Tables menu item

2. Select the EmployeeDepartment record in the list and click the Fields tab.


Fields tab
Figure 20 - Fields tab

3. Click the Add Fields button.


Add Fields button
Figure 21 - Add Fields button

4. Type AfterHoursContact in the Field ID field.

5. Select Text in the Data Type field.

6. Select _Text in the Default Display Type field.


Add AfterHoursContact field
Figure 22 - Add AfterHoursContact field

7. Click the Save button in the form app bar.


Save button
Figure 23 - Save button

8. Click the Save button in the form app bar above the list.


Save button
Figure 24 - Save button

9. Click the Save button in the Table Upgrade window.


Save button
Figure 25 - Save button

Edit the Join Form

Following the update to the EmployeeDepartment table, the EmployeeDepartments join form will now be edited to include the After Hours Contact field. This ensures the new field is available at the form-level, allowing users to enter and maintain after hours contact details for each employee-department relationship.

1. Select Visual in the menu followed by Forms in the sub-menu.


Forms menu item
Figure 26 - Forms menu item

2. Select the Employee Departments record in the list and click the Pages tab.


Pages tab
Figure 27 - Pages tab

3. Select the General record in the list.


General record
Figure 28 - General record

4. Click the Fields tab.


Fields tab
Figure 29 - Fields tab

5. Click the Add Fields button.


Add Fields button
Figure 30 - Add Fields button

6. Select AfterHoursContact in the Field field.

7. Click the Cancel button in the Include In List If field and type true.

tip
Any additional fields added to the join form, must be included in the list to see them in your application!

8. Select _Text in the Display Type field.


Add After Hours Contact field
Figure 31 - Add After Hours Contact field

9. Click the Save button in the form app bar.


Save button
Figure 32 - Save button

10. Click the Save button in the form app bar above the list.


Save button
Figure 33 - Save button

In Application

The After Hours Contact field is controlled by the boolean switch on the Departments page. By default, the switch is set to false, and the After Hours Contact field is disabled and cannot accept a value.

When the boolean switch is

true
the After Hours Contact field becomes enabled, allowing users to enter after hours contact details for the employee-department relationship. If the switch is turned back to
false
, the field is disabled again and no after hours contact information can be entered.

Any value previously saved in the After Hours Contact field will be wiped if the switch is turned back to

false
.

Enable Extra Fields

1. Select an Employee record in the list and click the Departments tab.


Departments tab
Figure 34 - Departments tab

2. Turn a switch on for a department.

info
You can now enter a value in the After Hours Contact field. No value can be entered into a field if the switch is turned off for a department.
3. Enter value in the After Hours Contact field.


Add a departments record
Figure 35 - Add a departments record

4. Click the Save button.


Save button
Figure 36 - Save button

Disable Extra Fields

1. Turn a switch off, that was previously on.

info
If there is a value in the After Hours Contact field, it will be wiped.

Remove department record
Figure 37 - Remove department record

2. Click the Save button in the form app bar.


Save button
Figure 38 - Save button

Set Minimum and/or Maximum Items to Select

When creating a Join page, you can control how many related records a user is allowed to select by setting a minimum and/or maximum number of items. This ensures vaild selections. You can configure the join page in the following ways:

  • Minimum only: Set a number of items that must be selected. There is no upper limit, as long as the minimum requirement is met.
  • Maximum only: Limit users to selecting no more than a specified number of items, without requiring a minimum.
  • Minimum and maximum: Require the number of selected items to fall within a defined range. Users must select at least the minimum and no more than the maximum number of items.
  • No minimum and maximum: Allow any number of items to be selected, including none at all.

Set Minimum Items

1. Open the Departments page on the Employees record.

2. Type an integer value in the Minimum Items field.


Minimum Items field
Figure 39 - Minimum Items field

Set Maximum Items

1. Type an integer value in the Maximum Items field.


Maximum Items field
Figure 40 - Maximum Items field

Set Minimum and Maximum Items

1. Type an integer value in the Minimum Items field.

2. Type a larger integer value in the Maximum Items field.


Minimum and Maximum Item fields
Figure 41 - Minimum and Maximum Item fields

In Application

Appropriate messages will be delivered to the user in the UI when the conditions are not met.


UI message
Figure 42 - UI message