Skip to main content
Version: 7.9

Alarm Status - Filter on Associated Data

Inductive University

Alarm Status - Filter on Associated Data

Watch the video

Filtering on Associated Data

Another way to filter alarms in the Alarm Status Table is using associated data that was added to an alarm. You can easily and quickly search, filter, and display on specific alarms based on associated data configured in an alarm.

Alarm Status Table in Vision Client

It's a common design practice to associate alarm groupings on associated data of an alarm. In this example, a ‘WriteableFloat1’ tag was used to configure a ‘High Alarm', and associated data was added called 'Group' with a static value called ‘Group A’.

Alarm on Tag Configuration

Using a Script to Filter on Associated Data

Let's create a script to filter for all the alarms in the Alarm Status Table that have the associated data called ‘Group A’. Scripting allows you to use the 'filterAlarm' Extension Function specifically for filtering on associated data.

  1. Right click on the Alarm Status Table component, and scroll down and select Scripting.

  2. In the Component Scripting window, under Extension Functions, select 'filterAlarm'.

  3. Click the Enabled checkbox.

  4. Enter the code below into the 'filterAlarm' script. You can filter on anything you want here, but in this example, we are going to filter on 'Group A'.

    Extension Function - filterAlarm for 'Group A'
    group = alarmEvent.get("Group")
    if group == "Group A":
    return True
    return False

    Once your code is entered, it will look like this...

    Using a Script to Filter on Associated Data Step 4

    Click OK.

  5. This script only displays alarms matching the associated data for 'Group A'. For every alarm matching ‘Group A’, it will return ‘True’ and show the alarm in the Alarm Status Table. If the associated data does not match ‘Group A’, it will return ‘False’, and the alarm will not show up in the Alarm Status Table. The example below shows the alarm including all the details about the alarm.

    Note: if you are seeing alarms that do not match your associated data, check your filter settings in the Property Editor. You may need to uncheck the "Show Clear and Unacked" and "Show Clear and Acked" settings depending on what you want your operators to see.

    Using a Script to Filter on Associated Data Step 5

note

Important: If you have an error in this filtering script, it will return true for every alarm instance (and show all alarms) instead of displaying many errors to your users. You can find more information about the error in the Client Console under the Tools Menu.

Scripting gives you the ability to filter on associated data, but also gives you the freedom to filter on anything that you want.