Attribute Metadata - Related Data Card Search
Attribute Metadata - Related Data Card Search
Related data card search can be used with any attribute of type reference with the default handler. The possibility to use it with attributes with special handlers depends on whether the handler alters the default editing view of the attribute. If a related data card search has been configured for an attribute, a button is showed next to it while editing the data card. Pressing this button triggers a search and shows the results in a panel inside the editing area (without page refresh).
To configure a search, you must insert one or more EQL queries to the metadata of the attribute. More information about the EQL queries can be found in the EQL Editor article. There is also one EQL macro specific for the related data card search:
Table 1. Related Data Card Search Specific EQL Parameter
| Name | Description |
|---|---|
#target# |
Target is a macro used to identify the value of the referring attribute (or the first selected value in case of multivalue reference). |
#target:attributeCode1# |
It is also possible to use attributes of the target entity as search criteria. For example a search that displays only those data cards that have the same contact as the target, would need a criteria along the lines of this: $referrer_contact$ = #target:target_contact#. |
Please note that #referrer# macro can not be used with the EntitySearch handler. Use the #target# macro instead.
Table 2. Extra Configurations of the Related Data Card Search
| Name | Description |
|---|---|
Related Data Card Search Limit |
The maximum amount of results to show (for each search). This is mandatory for the related searches to function properly. |
Related Data Card Show Headers |
Whether or not to show the attribute names of the displayed attributes as the headers of the table. |
Related Data Card Show Self |
Whether or not the the data card that is currently being edited should be allowed to appear in the search results. |
Related Data Card Panel Header |
An optional panel header text that explains what the shown search results are. |
Example Configuration
In the picture below is an example configuration configured with the EQL Editor. With this configuration, the panel will show all "3 Incident" templates that refer in their $configurationItems$ to the same item that the data card that we are editing refers to (or to the first selected one in case of multivalue reference). The search will only include items that are not deleted (in the recycle bin). The attributes that will be shown in the panel showing the search result are determined in the "Columns" field by their codes.
Editing the search criteria:

The actual search criteria that was the outcome of the above configuration is shown in EQL format in the "Related Search: Query" field. Although it is possible to directly modify the query also in this form, it is advisable to use the simpler view of the EQL editor triggered from the "Edit" button next to the query. The additional metadata further configures the search to limit the search to maximum of 5 "hits". Also the search will newer show the data card being edited in the panel and will show the names of the attributes as headers of the result table.
Additional metadata of the search:

Once all the necessary metadata has been entered, the editing view of the data cards show a satellite antenna button next to the attribute in question. Pressing this button triggers the search and the results of the search are shown in a panel next to the button. The example configuration could result in a panel that would look like this:
Example related data card search panel:

Table of Contents