Alarm Filter String Syntax

You can use the User Form’s Alarm Filter String property to pre-filter alarms to those of potential interest to a particular user (see Specify a Default Alarm Filter). You can use the property to pre-filter alarms by the same attributes as those that can be specified using the Filter window (see Use the Filter Window to Filter Alarm Entries).

If your system comprises multiple ClearSCADA databases, be aware that any filters you specify using the Alarm Filter String only apply to the particular ClearSCADA database on which a User Account is located. For each user that has access to Multiple Databases, a separate User Account has to exist on each ClearSCADA database to which that user has access. For such users, you need to specify an Alarm Filter String for each of those User Accounts. Depending on the attribute(s) by which alarms are being filtered, the filter string might need to differ on each of those User Accounts (for example, if alarms on one ClearSCADA database are to be filtered by a Source or AOI (Area of Interest) that exists on one ClearSCADA database, but not on another).

You specify a user’s Alarm Filter String using specific syntax. The attributes by which you can filter alarms are listed in the table below. Several restrictions apply to the syntax used to specify any of those attributes:

The attributes by which you can filter alarms using the Alarm Filter String are as follows:

Filter Attribute Value Type Comments
AlarmState

String

Use to filter alarms by alarm state. This is equivalent to using the State combo box on the Filter window.

The states by which you can filter alarms are:

Acknowledged, Cleared, Unacknowledged, Uncleared, and UnacknowledgedUncleared. You can only specify up to one AlarmState clause and value per alarm filter string. Whenever the AlarmState attribute is omitted from an alarm filter string, ClearSCADA includes each alarm that meets all of the other filter criteria, regardless of alarm state.

Example:

AlarmState="Acknowledged"

(Resulting in alarms being filtered to those that have been acknowledged, but for which the condition that caused the alarm still exists.)

AOI

String

Use to filter alarms by Area of Interest. This is equivalent to using the Area of Interest section on the Filter window.

This attribute only applies if the Area of Interest feature is enabled on your system (see Restrict Alarm and Event Access to Specific Areas of Interest in the ClearSCADA Guide to Core Configuration).

On systems on which multiple Area of Interest levels exist, use a dot separator (.) to indicate each hierarchical level.

You can specify single or multiple Areas of Interest. Include a separate AOI clause for each Area of Interest that you want to specify.

Example:

AOI="South-West.SW2"&AOI="North-East.NE1"

(Resulting in ClearSCADA filtering alarms to those that are assigned the SW2 Area of Interest (which is itself within the South-West Area of Interest), or the NE1 Area of Interest (which is within a North-East Area of Interest).)

Assigned

Boolean

Use to filter alarms to those that are assigned to the current user or ViewX workstation. This is equivalent to using the Only Show Alarms Assigned to Current User check box on the Filter window.

When TRUE, alarms are restricted to those that are assigned to the current user or ViewX workstation. When this attribute is omitted from the Alarm Filter String, ClearSCADA assumes the attribute to be FALSE.

Example:

Assigned="True"

Categories

String

Use to filter alarms by alarm category (or type of alarm). This is equivalent to using the Categories section on the Filter window.

You can specify single or multiple categories. To specify multiple categories use either of these methods:

  • Use a semi-colon (;) to separate each additional category in a single Categories clause. Ensure no spaces are included either side of the semi-colon. Only include spaces where they exist in the category name.
  • Specify each filter value as a separate Categories clause, in the same way as you would other alarm filter attributes.

You can ascertain the category names that exist on your system from, for example, the Category column on an Alarms List or the Alarm Banner, or from the Filter window.

Example:

Categories="Point Error;Point No Change;Point State"

or:

Categories="Point Error"&Categories="Point No Change"&Categories="Point State"

(Either string results in ClearSCADA filtering the alarms to those point alarms that are associated with any of the above categories.)

MinSeverity Integer

Use to specify the minimum priority of the alarms that are to be included in alarm displays. This is equivalent to using the Minimum combo boxes on the Filter window.

With the Filter window, you specify the priority by selecting the severity Description that is assigned to that level of alarm. With the Alarm Filter String, you specify the Priority level. You can ascertain the Priority level that applies to each severity Description on your system by looking at the Severities section of the ClearSCADA Server Configuration Tool.

You can use the Alarm Filter String to specify up to four minimum severities. Include a separate MinSeverity clause for each priority range to which you want to restrict the alarm entries. With multiple MinSeverity clauses, follow each clause with a MaxSeverity clause (see below).

With a single MinSeverity clause, inclusion of a MaxSeverity clause is optional. (If it is excluded from the Alarm Filter String, ClearSCADA assumes the MaxSeverity attribute’s value to be that of the maximum priority level configured on your system.)

For an example that demonstrates the syntax used for defining the MinSeverity attribute, see the MaxSeverity entry below.

MaxSeverity

Integer

Use to specify the maximum priority of the alarms that are to be included in alarm displays. This is equivalent to using the Maximum combo boxes on the Filter window.

As with the MinSeverity attribute (see above), when including this attribute in the Alarm Filter String, you use it to specify the Priority level. You can ascertain the Priority levels on your system by looking at the Severities section of the ClearSCADA Server Configuration Tool.

You can use the Alarm Filter String to specify up to four maximum severities. Include a separate MaxSeverity clause for each priority range to which you want to restrict the alarm entries. With multiple MaxSeverity clauses, precede each clause with a MinSeverity clause (see below).

With a single MaxSeverity clause, inclusion of a MinSeverity clause is optional. (If it is excluded from the Alarm Filter String, ClearSCADA assumes the MinSeverity attribute’s value to be that of the minimum priority level configured on your system.)

Example:

MinSeverity="1"&MaxSeverity="334"&MinSeverity="667"&MaxSeverity="1000"

(Resulting in ClearSCADA filtering alarms to those that have a severity within the range 1 and 334, or 667 and 1000 inclusive.)

Source

String

Use to filter alarms by alarm source (the Group(s), Group Instance(s), or individual item(s) with which the alarms are associated). This is equivalent to using the Sources section on the Filter window.

Each source needs to include the full path within the specific ClearSCADA database. Use a dot separator (.) to indicate each hierarchical level within the database. With the Source attribute, you can optionally include Filter Wildcards to define the values by which ClearSCADA is to filter the alarms.

You can specify single or multiple sources. Include a separate Source clause for each source that you want to specify.

Example:

Source="Northern Region.Zone 1"

(Resulting in ClearSCADA filtering the alarms to those for database items within the group ‘Zone 1’. The ‘Zone 1’ group is located within the ‘Northern Region’ group.)

Region String

Use to filter alarms by one or more geographic regions (see Geographic Regions).

You need to specify the full database path to each region. Use a dot separator (.) to indicate each hierarchical level within the database.

You can specify single or multiple regions. Include a separate Region clause for each region that you want to specify.

The alarm filtering in this case will be an OR operation. That is, the filter will include alarms within either of the specified regions.

Example:

Region="East.Region1"&Region="North.Region6"

This filters for alarms within either East.Region1 or North.Region6.

Example:

The Alarm Filter String on a particular User Account is configured as:

AlarmState="UnacknowledgedUncleared"&Categories="Point Error;Point State;Outstation Error;Channel Status"&MinSeverity="667"&MaxSeverity="1000"

This results in ClearSCADA filtering the alarms to those that fulfill all of the following filter criteria:

  • Alarms that are both Unacknowledged and Uncleared
  • Alarms that are assigned one of these alarm categories: Point Error, Point State, Outstation Error, or Channel Status
  • Alarms that have a severity of between 667 and 1000 inclusive. (The range for High and Critical priority alarms, by default.)

whenever that particular user logs on to a ViewX or WebX client.

The Alarm Filter String on another User Account is configured as:

Source="Zone #.*"&Categories="Point State"&Categories="Channel Status"

This results in ClearSCADA filtering the alarms to those for items:

  • In the database groups ‘Zone 1’ to ‘Zone 9’
  • That are assigned one of these alarm categories: Point State, or Channel Status.

(For information on the filter wildcards that are supported by the Source filter attribute, see Filter Wildcards.)

If the syntax that is specified in the Alarm Filter String is invalid, ClearSCADA displays one or more diagnostic messages in a message area at the bottom of the User Form. The message area is displayed once an attempt is made to save any invalid configuration (see Mandatory Configuration and Invalid Configuration Messages in the ClearSCADA Guide to Core Configuration).

If the syntax is valid but includes non-existent value(s) (such as a non-existent database item or path), a diagnostic message will be displayed when ClearSCADA attempts to apply the default filter.

As with any User Account settings, if changes are made to a user’s default Alarm Filter String while that user is logged on, the changes will only take effect the next time that user logs onto the system.


Disclaimer

ClearSCADA 2017 R2