Tap Forms has the ability to link forms together to establish relationships between them. There are currently two types of links:
- One to Many
- Many to Many
To make it easier to identify what is being talked about in this section of the documentation, I’ll refer to the main form as the parent form. Any form that the main form links to will be called the child form.
One to Many
The One to Many link type is useful in situations where the child form’s data is unique to the parent record it’s linked to. That is, no two parent records should link to the exact same records from the child form. It’s easiest to describe this situation using an example.
Keeping Track of Clients and Expenses
If you wanted to keep track of all the expenses you incur when working for a specific client, you wouldn’t want those expenses to be linked to any other client than the one for whom you are currently working. A one to many relationship is useful in this situation. One client has many unique expenses which are attributable only to it.
Create a Client Expenses form:
Create a Clients form and link it to the above Client Expenses form:
Make sure you’ve selected One to Many as the Link Type.
Now when you add or edit a record on your Client form, you can see the list of Client Expenses. Initially there will be none, but you can click the + button above the list of Client Expense records to add one. By adding a record from this view Tap Forms will link the new Client Expense record to the parent Client record.
When you add a child record to the parent record form, Tap Forms will switch the display to the child form (in this case Client Expenses) along with a back button which when clicked will return you to the parent record from where you came.
Many to Many
An example of a Many to Many link could be a list of team members who are assigned to projects for the selected Client.
Add a Team Members form that contains a list of people that work at your company. You could add their name and job title.
Now add the linked form field to the original Clients form:
Make sure you click on Many to Many for the Link Type and select the Team Members form from the Link to Form property.
Now when you view your Client record the list of Team Members will initially be empty:
After you’ve added some Team Members you’ll be able to select from the list of Team Members by clicking on the checkmark button just below the linked field.
This will display a popover with a list of child records which haven’t yet been linked to your parent record.
Select one or more records from the popover and then click the Select (#) button.
The list of linked records will update to show the records you’ve previously selected and the records you’ve just selected.
And that’s the difference between a One to Many and a Many to Many Link to Form field.
Besoin d'aide supplémentaire avec ce sujet?
N’hésitez pas à nous contacter ici.