Back to ITRS Internal Only FAQ

Internal documentation only

This page has been marked as draft.

How to count number of occurrences of given value in output

This documentation addresses the configuration of headline variables to perform conditional counts on specific column data. Specifically, it covers how to aggregate and display the totals of distinct cell values—such as “attached” and “detached” statuses—from a dataview column into separate, dedicated headline cells for real-time tracking.

Problem Copied

The user is experiencing difficulty configuring Gateway headlines to dynamically count and display specific string values within a dataview column. The primary challenge involves creating a distribution logic where the system distinguishes between two distinct states (“attached” and “detached”) and populates two separate headlines with their respective totals. Without the correct syntax, the headlines fail to increment based on the specific cell content, resulting in inaccurate or empty summary data in the user interface.

Geneos -  How to count number of occurrences of given value in output.

Possible causes Copied

Possible solutions Copied

Replication steps Copied

Geneos -  How to count number of occurrences of given value in output.

As you can see above, I managed to count the attached and detached. Please see how I can achieve that:

  1. Create the headlines here:

Geneos -  How to count number of occurrences of given value in output.

  1. I made two different rules for the attached and detached.

Geneos -  How to count number of occurrences of given value in output.

  1. Create a “path aliases” for attached and detached.
  1. Copy the path of your headline (attached and detached).
  1. Paste it into the Target
  1. Apply the rule that comes from this article - Geneos - How do I get the total number of rows returned in a rule? (rowcount)

Note: Please change the variables based on what you declared on the “PathAliases”

Then you can check how many counts are on the attached and detached. Upon testing it,

Complete view - Tried to add the word “detached”

Geneos -  How to count number of occurrences of given value in output.

Will replaced the last detached with the attached.

Geneos -  How to count number of occurrences of given value in output.

The replication XML is attached for reference.

["Geneos"] ["FAQ"]

Was this topic helpful?