Related Models
Related Models let you load and display data from related collections inside a collection's views. They are available in the Detail View tab and in the Add and Edit forms. In the detail view they render as related records for reading; in forms they render as editable subforms for viewing, linking, or editing related records.
Go to Areas → General, click the gear icon on a collection, then open Related Models in the Detail View tab or in a form's configuration.
In the detail view
Choose how related records are structured on the detail view page:
| Layout mode | Description |
|---|---|
| Tabs | Each related model shows in its own tab at the bottom of the detail view. |
| Accordion | Related models stack as collapsible sections in one column. |
| Page | Links load related models on separate subpages. |
Select the checkbox next to a related model (labeled with its relation type, for example INCOMING or OUTGOING, and source collection) to enable it, then configure its features:
| Feature | Description |
|---|---|
| Required | Include the relation as required for the parent query (INNER JOIN instead of LEFT JOIN). |
| Nested Includes | Load child relations recursively. See Nested includes. |
| Customize Attributes | Control which fields are fetched and how they appear. See Customize attributes. |
| Where Clause | Filter the related records with conditions (incoming relations). |
| Order By | Sort the related records by field and direction (incoming relations). |
| Apply Scope | Restrict which related records appear. See Apply Scope. |
| Limit | Set record limits and pagination sizes (incoming relations). |
The right-hand Query Preview panel shows the generated query. Switch between JSON Config and Sequelize Code, and click Copy to copy the block.
Customize attributes
Configure how each field of the related model displays:
| Column | Description |
|---|---|
| Field Name | The field identifier. Required fields are marked with a star. |
| Column Span (0-12) | The number of grid columns the field spans. |
| Visible | Whether the field appears in the related table. |
| Sortable | Whether users can sort the related table by this column. |
| Actions | Click the gear icon to open the Navigation Config dialog. |
Nested includes
On the Nested Includes tab, configure child relations recursively:
- Select the checkbox for a child relation (for example,
employeeProfile INCOMING from collection employee). - Configure its own feature toggles.
- The query preview updates to show the nested relationship.
In add and edit forms
Turn on Include Related Models on a form's Related Models tab to embed related records as editable subforms. Select a related model, then configure its features:
| Feature | Description |
|---|---|
| Customize Attributes | Select and configure which fields appear in the subform. |
| Display Settings | Set layout spacing and widths for the subform fields. |
| Apply Scope | Restrict which related records surface in the subform. |
Configure each field in the subform:
| Column | Description |
|---|---|
| Field Name | The field identifier. Required fields are marked with a star. |
| Column Span (0-12) | The number of grid columns the field spans. |
| Default Value | Click Set / Edit to set a static default or populate from the logged-in user. |
| Form Required | Whether users must provide a value in the subform. |
| Visible | Whether the field appears in the subform. |
In a subform, Apply Scope conditions combine with OR logic — a record appears if it matches any rule.