⚙️ Display more than one of associations tab-like system.
Overview
The associations tile displays one or more Associations in a tab-like system.
Object Properties
The table provides a summary of the object properties associated with the associations tile type items, including their types, mandatory or optional status, and descriptions.
| Field | Type | Mandatory/Optional | Description |
|---|---|---|---|
type | string | Mandatory | Always set to associations. |
load-all | bool | Mandatory | If true, all Associations for this record will be included in this set of tabs. For example, if we have a record with six Associations, this tile will have 6 tabs. If false, only the items in the Note that if |
titles | bool | Optional | If false, the title of the association-tab tile will be hidden by default. This can be overridden in the options of the association-tab tile itself (by adding an Association into the content array). |
exclude | array | Optional | An array of objects describing Associations to exclude. Note that this only applies if load-all is set to true. |
content | array | Optional | An array of association-tab items. Any Associations added here will be displayed first in the list of tabs (left-most), and we can use association-tab tiles to set filters, change the default behaviour, etc. |
Sample Configuration
- Here is a simple configuration that can be placed on any entry layout to render all Associations with their default settings:
{
"type": "associations",
"load-all": true
}- Here is an example of enforcing an order by defining Association-Tab items and setting complex options:
{
"type": "associations",
"load-all": true,
"titles": false,
"content": [
{
"type": "association-tab",
"tab-title": "Contacts",
"title": "Contacts",
"record": "contacts",
"field": "customer",
"source": "layout",
"layout-id": 13515,
"options": {
"quickFilters": false
}
},
{
"type": "association-tab",
"tab-title": "Active employees",
"record": "employees",
"field": "owner",
"source": "layout",
"options": {
"pageSize": 5,
"filter": [
{
"requestType": "i",
"subject": "inactive",
"type": "checkbox",
"operator": "is_false"
}
],
"quickFilters": [{"fieldId":3515},{"fieldId":349}]
}
},
{
"type": "association-tab",
"tab-title": "Inactive employees",
"title": "Inactive employees",
"record": "employees",
"field": "owner",
"source": "layout",
"options": {
"pageSize": 5,
"filter": [
{
"requestType": "i",
"subject": "inactive",
"type": "checkbox",
"operator": "is_true"
}
],
"quickFilters": [{"fieldId":3515},{"fieldId":349}]
}
}
]
}
Note:
- In this example, the first 3 tabs (shown left to right on the screen) will be as follows:
["Contacts", "Active employees", "Inactive employees", ...rest]
Where...restwill be any remaining Associations that are linked to this record.- We have two Associations that point to the same record / field: “Active employees” and “Inactive employees”. This is very powerful, as it allows us to logically split data and show it in different places, using filters.
📌 Need Help?
