Create Parent Table Relationships
Last updated 25/10/2023
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.Important
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.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.
Figure 2 - Grouped Member lookup
Create a Parent Relationship
PrerequisiteA 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.Figure 3 - Add a table
2. Click the Add Fields button and add field/s to your table.
Figure 4 - Add field/s
3. Click the Next button.
Figure 5 - Next button
4. Click the 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.
Figure 7 - Select a table
7. Click the Parent checkbox.
info
This table (Gym) will now become the parent for the current table (Member).
Figure 8 - Parent checkbox
8. Click the Save button.
Figure 9 - Save button
9. Click the Save button in the Table Upgrade window.
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.Figure 11 - Add a table
2. Click the Add Fields button and add field/s to your table..
Figure 12 - Add a field
3. Click the Next button.
Figure 13 - Next button
4. Click the 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.
Figure 15 - Select the child table
7. Click the Save button.
Figure 16 - Save button
8. Click the Save button in the Table Upgrade window.
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.
Figure 18 - Grouped by the parent