Skip to main content

Create Parent Table Relationships

Last updated 19/03/2024

How to Create Parent Table Relationships with Five's Table Wizard

Learn how to create a parent table relationship with Five's Table Wizard. This is the third tutorial in a series of four videos.

note
If you are following along with the tables being built in this tutorial, please DELETE the Member table so you can fully see how to build a parent relationship in the Table Wizard.

Three tables will be used to demonstrate how to set up a parent relationship.

What is a Parent Relationship

A parent relationship enables you to group data in a lookup field. For example, say we had a Member lookup field, without the parent relationship, all the members would be listed in the lookup as shown in the image below.

Member lookup
Figure 1 - Member lookup

If a parent table is selected for the Members table, the Members lookup field would then group the data. Let's say the Gym table is selected to be the parent, this would make the members to be grouped by the location of their gym. Now you can clearly see the members that belong to a particular gym location as shown in the image below.

Grouped Member lookup
Figure 2 - Grouped Member lookup


Create a Parent Relationship

Prerequisite
A saved table in Five, that the child table can reference. For this example, the Gym table is already saved in Five.

Step 1

1. Type a name in the Name field.


Add a Table
Figure 3 - Add a table

2. Click the Add Fields button and add field/s to your table.


Add Field/s
Figure 4 - Add field/s

3. Click the Next button.


Next Button
Figure 5 - Next button

4. Click the Add Relationships button.


Add Relationships Button
Figure 6 - Add Relationships button

5. Click the lookup icon in the Table field and select a table.

6. Optional: Click the Required checkbox.


Select a Table
Figure 7 - Select a table

7. Click the Parent checkbox.

info
This table (Gym) will now become the parent for the current table (Member).

Parent Checkbox
Figure 8 - Parent checkbox

8. Click the Save button.


Save Button
Figure 9 - Save button

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


Save the table upgrade
Figure 10 - Save the table upgrade

info
For the example above, another table needs to be created that has a relationship with the Member table. With the Gym table as the parent of the Member table, the Members field on a form will have its members grouped by the gym location that the members belong to.

Step 2

1. Type a name in the Name field.


Add a Table
Figure 11 - Add a table

2. Click the Add Fields button and add field/s to your table..


Add a Field
Figure 12 - Add a field

3. Click the Next button.


Next Button
Figure 13 - Next button

4. Click the Add Relationships button.


Add Relationships Button
Figure 14 - Add Relationships button

5. Click the lookup icon in the Table field and select the child table. For this example, the Member table.

6. Optional: Click the Required checkbox.


Select the Child Table
Figure 15 - Select the child table

7. Click the Save button.


Save Button
Figure 16 - Save button

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


Save the table upgrade
Figure 17 - Save the table upgrade

info
Once your forms are created, you will see that the child table values are grouped by the parent table values.

Grouped by the Parent
Figure 18 - Grouped by the parent