Connecting Your Data
A relationship links records of one data model to records of another, such as each Survey to the Site where it happened. This page covers creating and editing relationships, how they appear on the record form, and fields stored on the link itself.
Creating a Relationship
Editor (Admin) members can create relationships. Open the data model whose form should get the selector, go to its Relationships tab, and click Add Relationship. The Create New Relationship page has these settings:
- The sentence: sets the direction and the target data model. See the next section, Relationship Sentence Builder.
- Relationship Label: up to 32 characters. It's the heading of the selector on the record form and defaults to the target data model's name.
- Relationship Limit: only for "can have many." The highest number of target records each record can link to. 0 means no limit.
- Display Fields: one or more fields of the target data model, joined with " - " to identify each target record in the selector.
- Required Relationship: when checked, a record can't be saved without at least one link.
Click Create Relationship to save. A data model can't be connected to itself.
The Relationships tab lists only the relationships that start from this data model. Relationships that point to it are listed on the other data model's tab.
Editing a relationship. Click it in the list. The Edit Relationship page has the same settings, and every one can be changed, including the direction and the target data model. Saving with Update Relationship doesn't change links that records already have:
- After you change the target data model, existing links still point to records of the old target. Change the target before records are linked.
- After you lower the limit, records keep their extra links until someone next saves them. That save removes the links over the new limit, without a warning.
Deleting a relationship. Delete Relationship asks for confirmation: "all relationship data between records will be permanently lost," including values in its Additional Fields.
Relationship Sentence Builder
The top of the create page builds a sentence from three parts:
- This data: the current data model. You can't change it here.
- How are they connected?: "belongs to one" or "can have many."
- What does it connect to?: the target data model.
The preview reads, for example, "Each Survey belongs to one Site." Choosing "belongs to one" sets the limit to 1. Choosing "can have many" shows the Relationship Limit setting.
The current data model is always the source, and only the source's record form gets a selector. The same real-world link can be built from either side:
- From Survey: "Each Survey belongs to one Site." The Survey form gets a Site selector, so whoever enters a Survey picks its Site.
- From Site: "Each Site can have many Surveys." The Site form gets a Surveys selector, so whoever edits a Site picks its Surveys.
Create the relationship from the data model people fill in when they know the link. Surveys are usually entered after their Site exists, so the first version fits most studies.
connection-sentence-builderThe relationship sentence builder with the preview sentence and three controls: This data, How are they connected?, and What does it connect to?
The preview sentence states the direction and limit before you save.
Relationships on the Data Entry Form
Each relationship adds a selector to the source data model's record form, in the position set on the Fields tab. The selector lists the target data model's records using the Display Fields. For example, with Display Fields Site Name and Lake Type, a Site appears as "Clearwater Lake - Oligotrophic."
With "belongs to one," you pick one record. With "can have many," you can pick up to the relationship limit.
The link shows in both directions after saving. The source record's page shows the linked records, and the target record's page lists the records that link to it. Only the source form has the selector.
relationship-select-on-record-formA record form with a relationship selector open, listing target records by their display fields
The selector identifies each target record by its Display Fields.
Additional Fields on Relationships
Some information belongs to the link rather than to either record. When a Survey links to the Species it observed, the number counted is a fact about that species in that survey. Store it in the relationship's Additional Fields.
Open the relationship's edit page and click Add Field in the Additional Fields section. The type list there uses older names for four of the types:
- Text is Short Text.
- Textarea is Long Text.
- Date is Date/Time.
- Choice is Multiple Choice.
Number, Email, URL, and Yes/No are the same as on the Fields tab. Image, Media Slider, and 3D Model aren't available. Validation rules work as on regular fields. Display rules and form preview aren't available for these fields.
On the record form, the Additional Fields appear under each linked record, so a Survey linked to three Species has a Count for each.
pivot-attribute-on-formA record form showing a linked record with an additional field directly beneath it
Additional Fields appear under each linked record.
Relationship Network
The Relationships tab shows a network of every data model in the project and the relationships between them, with the current data model highlighted. Each line ends in a circle showing the relationship limit: ∞ for no limit, or the number. Click a data model to open its Relationships tab, or a limit circle to open that relationship. The network appears once the project has at least one relationship.
Use it to check that every data model that should be connected is, and that each relationship points the way you intended. Understanding Your Data Design shows an example.


