Skip to main content

Join Page Type

Last updated 24/11/2021

Add a Join Page

To create a join page you will need to have a many-to-many relationship in your database. This occurs when several records in a database table are linked with multiple records in another table.

Example

In the Production application the following occurs:

  • An employee may work in one or more departments.
  • Each department may have one or more employees.
Many-to-Many-Relationship
Figure 1 - Many-to-many relationship

A third entity is required to resolve this many-to-many relationship. This is like the middle entity. The original many-to-many relationship will become two one-to-many relationships. The unique identifier (Primary Key) of the Employee and the Department tables are taken on by the middle entity as foreign keys. This is represented in the diagram below.

A Join Table
Figure 2 - A join table is created

For this example, we will create an Employees form that has a Departments join page to enable us to assign a department/s to an employee. Three forms will need to be created to achieve this.

Prerequisite

A many-to-many relationship must be established at the table-level.

Post Requisite

A menu item will need to be created for each of the forms that is not the join form. For this example, a menu item will need to be created for the Departments and Employees forms.

Steps

The following steps to add a join page are broken into stages.

Stage 1 - Add the First Form

For this example, the Departments form will be the first form.

  1. Select Forms in the menu.
  2. Click the Add Item button in the list app bar.
  3. Type a title in the Title field. For this example, Departments.
  4. Use the lookup icon in the Table field and select the required table. For this example, The Department table.
  5. Click the Pages tab.
Add the Departments Form
Figure 3 - Add the Departments form

  1. Click the Add Pages button.
Add Pages Button
Figure 4 - Add Pages button

  1. Type a caption in the Caption field. For this example, General.
  2. Click the Fields tab.
Add the General Page
Figure 5 - Add the General page

  1. Click the Add Fields button.
Add Fields Button
Figure 6 - Add Fields button

  1. Add the details for the required fields to the form.
  2. On completion of the last field, click all three Save buttons in the stacked form app bars.
Save the Form
Figure 7 - Save the form

  1. Create a menu item for the form.

Stage 2 - Add the Second Form

For this example, the Employees form will be the second form.

  1. Click the Add Item button in the list app bar.
  2. Type a title in the Title field. For this example, Employees.
  3. Use the lookup icon in the Table field and select the required table. For this example, the Employee table.
  4. Click the Pages tab.
Add the Employees Form
Figure 8 - Add the Employees form

  1. Click the Add Pages button.
Add Pages Button
Figure 9 - Add Pages button

  1. Type a caption in the Caption field. For this example, General.
  2. Click the Fields tab.
Add the General Page
Figure 10 - Add the General page

  1. Click the Add Fields button.
Add Fields Button
Figure 11 - Add Fields button

  1. Add the details for the required fields to the form.
  2. On completion of the last field, click all three Save buttons in the stacked form app bars.
Save the Form
Figure 12 - Save the form

  1. Create a menu item for the form.

Stage 3 - Add the Join Form

For this example, the EmployeeDepartments form will be the join form.

  1. Click the Add Item button in the list app bar.
  2. Type a title in the Title field. For this example, EmployeeDepartments.
  3. Use the lookup icon in the Table field and select the required table. For this example, the EmployeeDepartment table.
  4. Click the Pages tab.
Add the Employee Departments form
Figure 13 - Add the Employee Departments form

  1. Click the Add Pages button.
Add Pages Button
Figure 14 - Add Pages button

  1. Type a caption in the Caption field. For this example, General.
  2. Click the Fields tab.
Add the General Page
Figure 15 - Add the General Page

  1. Click the Add Fields button.
Add Fields Button
Figure 16 - Add Fields button

  1. Use the lookup in the Field field and select one of the foreign key fields. For this example, the DepartmentKey field.
  2. Type a caption in the Caption field. For this example, Department.

tip

As this is the first field for the form, the Include In List switch will be in a true state. We need both of the foreign key fields to be included in the list for the join page to work.


  1. Use the lookup icon in the Display Type field and select _Lookup.
  2. Use the lookup icon in the Reference Form field and select the required form to reference. For this example, the Departments form.
  3. Click the Save button in the form app bar.
Save the Department Field
Figure 17 - Add the Department field

  1. Click the Add Fields button.
Add Fields Button
Figure 18 - Add Fields button

  1. Use the lookup icon in the Field field and select the other foreign key field. For this example, the EmployeeKey field.
  2. Type a caption in the Caption field. For this example, Employee.
  3. Click the Include In List switch to a true state.
  4. Use the lookup icon in the Display Type field and select _Lookup.
  5. Use the lookup icon in the Reference Form field and select the required form to reference. For this example, the Employees form.
  6. Click all three Save buttons in the stacked form app bars.
Save the Employee Field
Figure 19 - Save the form.

Stage 4 - Edit the Employee Form to Add the Join Page

For this example, the join page is going to be added to the Employees form. This will allow us to assign department/s to an employee.

  1. Select the form record in the list to add the join page. For this example, the Employees record.
  2. Click the Pages tab.
Edit the Employees Record to Add the Join Page
Figure 20 - Edit the Employees record to add the join page

  1. Click the Add Pages button.
Add Pages Button
Figure 21 - Add Pages button

  1. Type a caption in the Caption field. For this example, Departments.
  2. Use the lookup icon in the Page Type field and select Join.
  3. Use the lookup icon in the Action Field and select the join form's Action ID. For this example, EmployeeDepartments (Form).
  4. Click the Save button in the form app bar.
Add the Join Page
Figure 22 - Add the join page

  1. Click the Save button in the form app bar above the list.
Save the Form
Figure 23 - Save the Form

How This Will Look in Your End-User Application

  1. Select the menu item for the form not holding the join page. For this example, the Departments menu item.
  2. Click the Add Item button in the list app bar.
  3. Fill in the fields on the Departments form.
  4. Click the Save button in the form app bar.
  5. Repeat the above steps to add a few more departments.
Add Departments
Figure 24 - Add departments

  1. Select the menu item referencing the form that holds the join page. For this example, the Employees menu item.
  2. Click the Add Item button in the list app bar.
  3. Fill in the fields on the Employees form.
  4. Click the tab to navigate to the join page. For this example, the Departments tab.
Add an Employee
Figure 25 - Add an employee and navigate to the Departments page

  1. Select a switch/es to turn to a true state.
  2. Click the Save button in the form app bar.
Assign Departments to an Employee
Figure 26 - Assign departments to an employee

Set Minimum and/or Maximum Items to Select

When creating a join page, you can define a minimum and/or maximum amount of items that can be selected. The following options can be set.

  • A minimum amount of items with no maximum amount set.
  • A maximum amount of items with no minimum amount set.
  • A minimum and maximum amount of items. The selected amount of items must fall in-between the minimum and maximum criteria.
  • No minimum or maximum amount of items. Any number of items, including zero, can be selected.

Default: No minimum and maximum values.

Set Minimum Items

  1. Select Forms in the menu.
  2. Select the required form record. For this example, the Employees form.
  3. Click the Pages tab.
Edit the Form
Figure 27 - Select form record holding the join page

  1. Select the required page record. For this example, the Departments record.
Page Record
Figure 28 - Page record

  1. Click the Edit button in the form app bar.
Edit the Form
Figure 29 - Edit button

  1. Type an integer value in the Minimum Items field.
  2. Click the Save button in the form app bar.
Set Minimum Items
Figure 30 - Set minimum items

  1. Click the Save button in the form app bar above the list.
Save the Form
Figure 31 - Save the form

Set Maximum Items

  1. Type an integer value in the Maximum Items field.
Set Maximum Items
Figure 32 - Set maximum items

Set Minimum and Maximum Items

  1. Type an integer value in the Minimum Items field.
  2. Type a higher integer value in the Maximum Items field.
Set Minimum and Maximum Values
Figure 33 - Set minimum and maximum values

How This Will Look in Your End-User Application

When a user selects the options they will be delivered a notification if the amount of choices is below the minimum amount or above the maximum amount if the Minimum Items and Maximum Items fields are set.

Below Minimum Items
Figure 34 - Number of items selected is below the set minimum

Above Maximum Items
Figure 35 - Number of items selected is above the set maximum