Association
Association fields aggregate data from related collections using SQL-like aggregate functions. They pull values across multiple related records and apply calculations.
View all settings
| Setting | Description |
|---|---|
| Field Name | Text input, required. Unique identifier for the association. |
| Input Type | Dropdown, required. Choose Many To One or Has One. |
| Display Label | Text input. Human-readable label shown in forms. |
| Sort Order | Number input, defaults to 0. Position in field lists. |
| Icon | Icon picker. Visual identifier. |
| Relation | Dropdown, required. The relational field to aggregate from. |
| Association Field | Dropdown, required. Field from the related collection to aggregate. Populates after selecting a Relation. |
| Aggregator Function | Dropdown. Only appears for Many To One. Choose SUM, COUNT, AVG, MIN, MAX, or CONCAT. |
| Concat | Text input. Separator for CONCAT aggregator. Only appears when Aggregator Function is CONCAT. |
| Save to Database | Toggle. Persist the aggregated value. Only appears for non-CONCAT aggregators. |
| Status | Toggle, defaults to true. Enable or disable the field. |
| Required | Checkbox. Make the association mandatory. |
| Description | Text area. Documents the field's purpose. |
Input Types
Choose the input type based on your relationship cardinality:
- Many To One — Aggregate data from multiple related records to one
- Many To Many — Aggregate data across a many-to-many relationship
- Has One — Pull a single value from a one-to-one related record. No aggregator function needed
Many To One and Many To Many show the Aggregator Function options (SUM, COUNT, AVG, MIN, MAX, CONCAT).
Basic Settings
Enter a Field Name using camelCase. Select the Relation to specify which relational field provides the data source — once selected, the Association Field dropdown populates with available fields from that related collection.
For Many To One and Many To Many relationships, choose an Aggregator Function to determine how multiple values are combined:
| Function | Description |
|---|---|
| SUM | Total of numeric values |
| COUNT | Number of related records |
| AVG | Average of numeric values |
| MIN | Smallest value |
| MAX | Largest value |
| CONCAT | Combine text values with a separator |
When using CONCAT, a Concat field appears to specify the separator (e.g., , or -).
For other aggregators, a Save to Database toggle appears to persist the calculated value.
Advanced Settings
The Description text area lets you document the association's purpose for your team.
Query Filters
The Query Filters tab lets you restrict which related records are included in the aggregation:
| Setting | Description |
|---|---|
| Field | Select a field from the related collection to filter on. |
| Operator | Comparison operator (is equal to, is not equal to, contains, etc.). |
| Value | The value to compare against. |
| From Form | Pull the filter value from a form field instead of a static value. |
| Optional | Make this filter condition optional. |
Click Add Filter to add multiple conditions.
Use Cases
- Count orders per customer — Many To One with COUNT
- Total revenue per product — Many To One with SUM on price field
- Average rating per item — Many To One with AVG on rating field
- Latest activity date — Many To One with MAX on date field
- Customer name from order — Has One to pull single related value
Difference from Compute
| Aspect | Association | Compute |
|---|---|---|
| Scope | Aggregates across multiple related records | Calculates within a single record |
| Data source | Related collections | Same record's fields |
| Use case | Totals, counts, averages | Formulas, concatenation, derived values |
Related
- Common Settings — Shared settings reference
- Relational — For creating relationships
- Compute — For same-record calculations