Associations

⚙️ 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.

FieldTypeMandatory/OptionalDescription
typestringMandatoryAlways set to associations.
load-allboolMandatory

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 content array will be rendered.

Note that if load-all is true, and there is an Association elsewhere on this entry layout, that Association won’t be rendered on this tile.

titlesboolOptionalIf 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).
excludearrayOptionalAn array of objects describing Associations to exclude. Note that this only applies if load-all is set to true.
contentarrayOptionalAn 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

  1. 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
}
  1. 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 ...rest will 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?

If you require assistance or encounter any issues, please don't hesitate to contact us for further support.