Handler - ReferrerCounter
ReferrerCounter handler is used to count the amount of data cards that refer to the same parent data card. It shows the total number of referrers in the parent attribute's data field as illustrated in the following picture.
An attribute with ReferrerCounter handler:

If no metadata is set, the ReferrerCounter handler simply counts all referring data cards. However, with metadata, you can limit the referrer search to specified templates, or to template/attribute pairs.
You cannot sort or search data cards by the ReferrerCounter handler.
The following tables provide information on the attribute settings and metadata configuration options for ReferrerCounter handler.
Table 1. Attribute Settings
| Handler name | Datatype |
|---|---|
ReferrerCounter |
Number |
Table 2. Required Attribute Metadata
| Name | Value | Description |
|---|---|---|
template_code |
template_code |
If Note that you can define as many templates as needed, each in its own row. |
template_attribute_codes |
[template_code:attribute_code] |
If Note that you can define as many template/attribute pairs as needed, each in its own row. |
countMode |
all/onlyVisible/onlyHidden |
countMode is used to restrict counting of referrers by their visibility state. The values have the following functionality:
Default setting is If |
You can define any combination of template codes and template/attribute code pairs. ReferrerCounter always counts the sum of total referring data cards that match any of the configurations. Note, however, that each referring data card is counted only once, even if it is found through several configurations.
Configuration examples
Suppose you would want to count how many Tickets are referring to a Person data card. In this case, you would only need to add ReferrerCounter attribute handler to the Person data card and specify the template code from the Ticket template in the metadata. For example, if the attribute handler was named “Ticket_Count” and the Ticket template code was “ticket”, the metadata configuration would look like this:

On the other hand, if you would want to know how many of the Tickets refer to the Person data card from the "Assigned to" attribute (as opposed to, for example, the "Customer" attribute), you would need to add a metadata configuration with both template code and attribute code. For example:

Table of Contents