Relationships
A relationship connects two entities so that records can refer to each other: a job belongs to a customer, an invoice has many line items, a project involves many staff members. Technically a relationship is stored as a link field on one of the two entities; the builder creates a
A relationship connects two entities so that records can refer to each other: a job belongs to a customer, an invoice has many line items, a project involves many staff members. Technically a relationship is stored as a link field on one of the two entities; the builder creates and maintains that field for you, draws the link in the relationships diagram, and lets pages show related records (a customer's jobs, a booking's service).
When to use
Create a relationship whenever one record "belongs to" or "is made of" records of another entity. If you find yourself typing a customer's name into a job by hand, you need a relationship instead.
The three kinds
One → many One Customer ──1────∞── Many Jobs
(the link field "Customer" lives on Jobs)
One ↔ one One Device ──1────1── One Warranty
(each link used once)
Many ↔ many Many Projects ──∞────∞── Many Staff
(the link field allows several records)| Kind | Business reading | Where the link field goes | Allows several? |
|---|---|---|---|
| One → many | One customer has many jobs | On the many side (Jobs gets Customer) | No: each job points at one customer |
| One ↔ one | One customer has one account profile | On the from entity | No, and a target may be used once |
| Many ↔ many | Many projects link to many staff | On the from entity | Yes |
One → many is by far the most common.
Create a relationship
- Open Data, pick an entity, open its Relationships tab (or the Relationships diagram tab for the whole app) and click New relationship.
- Choose From, the Kind and To. The dialog restates it in plain words — One Customer has many Jobs — and says where the link field will be added.
- Optionally name the link field (default: the singular of the target, e.g. Customer).
- Click Create relationship.
Alternatives that produce the same result: add a field of type Link to entity on the Fields tab (it asks How many?), choose a Link to entity starter field when creating an entity, or pick an entity template whose fields link to entities you already have.
Where relationships show up
- Forms: the link field becomes a picker that lists the target's records by their record title.
- Tables and cards: the link column shows the related record's title instead of its id.
- Queries: filter a list by the link field, for example Customer is Page parameter › id to show one customer's jobs on the customer's detail page.
- Records tab: link values are shown as chips with the related record's title.
- Diagram: entities as boxes, links as curves with 1 and ∞ markers; hover a link to read it, click an entity to open it.
Delete a relationship
Click the trash icon on the relationship row. The link field it uses is removed as well (stored values stay in records but are no longer shown). Undo restores both.
Example: a customer's jobs on the customer page
- Relationship One Customer → many Jobs (link field Customer on Jobs).
- Dynamic page Customer details at
/customers/:id. - A Table bound to Jobs with filter Customer is Page parameter › id.
Common mistakes
- Creating the link on the wrong side: for one → many, the link field must be on the many side (Jobs, not Customers). Use the dialog's wording to check.
- Editing a link field's target on the Fields tab: that changes the field but not the relationship; delete and recreate the relationship instead.
- Expecting a reverse list field: there is no automatic "Jobs" field on Customers; show related records with a filtered query.
- Importing links from a CSV with names: link values must be the related records' ids.