Handler - CategoryDropdownReference
Handler - CategoryDropdownReference
CategoryDropdownReference handler is used to generate dependencies between category dropdowns. With this handler, it is possible to state that another dropdown gets its possible values according to this handler's selected dropdown value.
Editing a data card that holds multiple category dropdowns (each "Category X" attribute). The screenshot is taken with Firefox. Internet Explorer would leave the "Category 4" dropdown white, instead of grey:

The image above shows an example of a dependency category.
- The value of the "
Category 1" limits down the possible values that the "Category 2" can have, and the "Category 2" limits down the possible values of the "Category 3", and so on. - In this example, the root of the dropdown category ("
Category 1") is configured to refer to all the data cards of a certain template.- The next level category ("
Category 2") is also configured to refer to all the data cards of a possibly different template (the template may be different that the referred template of the "Category 1"). - But as the "
Category 2" is the child of the "Category 1", there has to be a configuration that links the data cards of the referred template of the "Category 2" to the data card chosen from the category dropdown of the "Category 1". - This means that the eligible data cards for the "
Category 2" must refer to the already selected data card in the "Category 1".
- The next level category ("
- In the image above, the "
Application Services" data card refers to the "Servers and Storage" data card.
To enable "Reserve Ticket"-button function, please see Handler - TicketReservation
Default label for CategoryDropdownReference handler's button is value of presentation text button_reserve. Label value can be overwritten in template's localization editor.
Table 1. Attribute Settings
| Handler name | Datatype |
|---|---|
CategoryDropdownReference |
Reference |
Table 2. Required Attribute Metadata
| Name | Value | Description |
|---|---|---|
Category template |
[template code] | The code of the category template. Data cards of this template compose a category tree (parent-child relation). This means that for a template to be a valid category template, it has to have a referrer attribute, that refers to the parent data card. |
Attribute for parent category in category template |
[attribute code] | The code of the parent data card referrer attribute. This attribute must belong to the category template configured above, and it must be of type reference. |
Table 3. Optional Attribute Metadata
| Name | Value | Description |
|---|---|---|
Attribute for parent category |
[attribute code] | This attribute code points to the parent category dropdown attribute. Alternatively, the attribute code may point to a normal reference (see the example configuration). If this metadata is missing, it means that the attribute holding this handler is the root of the category dropdown hierarchy. |
|
|
[attribute code] |
Enable datacard reserving by configuring these five metadata. See Handler - TicketReservation for more information.
|
Configuration Examples
An example setup of a dependency category with one category template:
- Create a category template that has a parent data card referrer attribute (an attribute that refers to this same template just created) and a name field.
- Create a template that has two (or any number of your choice) attributes with CategoryDropdownReference handler. Set this template to refer to the category template.
- Give all the templates and attributes a unique code. (Attribute codes only need to be unique within one template.)
- Configure the first attribute with the handler (the dependency category root). In metadata, set the "Category template" to have the code of the category template as its value. Set the "Attribute for parent category in category template" to have the code of the parent data card referrer attribute as its value. Set no "Attribute for parent category" configuration, because this is the dependency category root configuration.
- Configure the other handler attribute: set the "
Category template" and the "Attribute for parent category in category template" to be the same as in the first configuration explained above. Set the "Attribute for parent category" to have the value of the previous handler attribute. - Create data cards of the category template: create one or more data cards that have no parent, and the create one or more data cards that have a parent.
- The dependency category is ready to be used.
Another example setup of a dependency category, but with multiple category templates:
- Follow the above example to set up the basic configuration.
- Create another category template with another parent data card referrer attribute, which refers to both this new category template and the category template previously created. This way the data cards of this template may belong to the category tree made up of the previously created template's data cards (a parent-child relation is created, which is a prerequisite for mapping data cards to a dependency category).
- Create a new
CategoryDropdownReferencehandler attribute to accompany the other previously created ones. Configure them to point to their parents (see "Attribute for parent category"). Set the "Category template" and the "Attribute for parent category in category template" to point to the new category template. Set this attribute to refer to the new category template just created. - We now have two category templates, one host template (the template holding these
CategoryDropdownReferencehandlers) and three attributes with that handler. The first category dropdown lists category root data cards of the first category template, the second category dropdown lists the data cards that have the selected category data card as their parent, and the last category dropdown lists the data cards of the second category template that have the another selected category data card as their parent.
It is also possible to set the highest category dropdown to depend on a normal reference. Here is a use case for this kind of a situation: my company has a hierarchical organization. While editing a data card, I wish to enter my unit in the organization by selecting it from the dependency category.
Continent, Country, Strategic Business Unit and Team are disabled, since the Company has not yet been selected:

In this configuration, Continent's "Attribute for parent category" is the code of the Company attribute, Country's "Attribute for parent category" is the code of the Continent attribute, and so on.
Select a one of the available options in Company to enable selecting a Continent.

The Continent selection is now enabled, since Asia, Europe and America refer to My company.

Further, it is now possible to select the Country, the Strategic Business Unit, as well as the Team.

Notice how Europe, Asia and America refer to My company. This enables the highest category dropdown to depend on a normal reference.

Table 4. Glossary
| Term | Description |
|---|---|
Category dropdown |
The field where the referred data card is chosen in the user interface (technically a html select element). It is an Matrix42 attribute, that has a CategoryDropdownReference handler attached. It is a part of a dependency category. |
Category data card |
One of the elements in a category tree. The template for it is a category template. |
Category root data card |
A data card in a category tree that has no parent. |
Category template |
Data cards of this template (category data cards) are eligible for a value of a category dropdown. This template must have an attribute that is of type reference, and that refers to a parent category data card. In other words, the attribute is configured to refer to the category template itself. |
Category tree |
A tree of Matrix42 data cards. Each data card in this tree can have a parent and one or more child data cards. If the data card has no parent, it is a category root data card. |
Dependency category |
This category is composed of multiple attributes that have a CategoryDropdownReference handler attached. |
Dependency category root |
This is a category dropdown that has no category parent configured in its metadata. |
Parent data card referrer attribute |
This is held by a category template. It refers to the possible parent of a category data card. |
Table of Contents