AlarmBanner.DefaultFilter

You can use the AlarmBanner.DefaultFilter property in conjunction with the AlarmBanner.SetFilterForSystem function to set the filtering that is being used in the Alarm Banner back to that of the logged on user's Default Alarm Filter. If the User Account of the logged on user does not have a Default Alarm Filter set, the AlarmBanner.DefaultFilter property removes any existing filtering from the Alarm Banner, so enabling the user to view any alarms to which their User Account provides access.

The AlarmBanner.DefaultFilter property is useful for reverting the Alarm Banner filtering back to its default after a custom menu option has been used to temporarily change the Alarm Banner's filtering. Such custom Alarm Banner filters can be set up using the AlarmBanner.SetFilterForSystem function (see AlarmBanner.SetFilterForSystem).

To enable users to revert the Alarm Banner's filter settings back to that of their User Account's Default Alarm Filter, you use the AlarmBanner.DefaultFilter property in conjunction with the AlarmBanner.SetFilterForSystem function to provide a separate custom menu option to do this. The custom menu option is made available for selection from the Alarm Banner's context-sensitive menu.

Syntax

AlarmBanner.DefaultFilter

Description

Use with the AlarmBanner.SetFilterForSystem function, to revert the filtering on the Alarm Banner back to that of the logged on User Account's Default Alarm Filter.

Arguments

None

Returns

DefaultFilter {string}

Returns a string that comprises the Default Alarm Filter of the User Account of the logged on user (or returns an empty string if the User Account does not have a Default Alarm Filter set).

 

The User Accounts on a particular Geo SCADA Expert system are assigned a Default Alarm Filter, which applies whenever the users log on to ViewX or Virtual ViewX.

A set of 4 custom alarm filters are made available for users to filter the entries in the Alarm Banner. To enable the users to remove the custom filtering once it is no longer required, a further custom menu option is provided to revert the Alarm Banner filtering back to their User Account's Default Alarm Filter.

To provide the required custom menu options, the Root Group includes the following Global Script:

Public Sub BuildAlarmMenu

If AlarmBanner.SelectedAlarms.Count > 0 Then

AlarmBanner.AddMenuItem "Eastern Region","SetAlarmFilterEasternRegion"

AlarmBanner.AddMenuItem "Northern Region","SetAlarmFilterNorthernRegion"

AlarmBanner.AddMenuItem "Southern Region","SetAlarmFilterSouthernRegion"

AlarmBanner.AddMenuItem "Western Region","SetAlarmFilterWesternRegion"

AlarmBanner.AddMenuItem "Revert Back to Default Alarm Filter","UseDefaultAlarmFilter"

End If

End Function

The above script is used to include the 5 custom options in the menu that is displayed whenever a user right-clicks on an entry in the Alarm Banner. If the user then selects one of those custom menu options, the script calls the function that applies the relevant filtering to the Alarm Banner.

Other script is provided to apply the regional-specific filtering. (For an example that demonstrates the type of script that might be used to provide such regional-specific filtering, see AlarmBanner.SetFilterForSystem.)

The following script is used for the function that is called by the 'Revert Back to Default Alarm Filter' custom menu option:

Public Sub UseDefaultAlarmFilter

Dim ParseError

ParseError = AlarmBanner.SetFilterForSystem("Local", AlarmBanner.DefaultFilter)

If ParseError <> "" Then

MsgBox "Filter", "Failed to set the filter. Parse Error: " & ParseError

End If

End Sub

The above script uses the AlarmBanner.DefaultFilter property to revert the Alarm Banner's filtering back to that of the logged-on User Account's Default Alarm Filter. The filtering applies to alarms that are in the "Local" Geo SCADA Expert system (database).

Further Information

Define the Default Alarm Filter Settings for a User.

AlarmBanner.SetFilterForSystem.

AlarmBanner.GetFilterForSystem.

'Standard' menu options that are available from the Alarm Banner: see Alarm Banner.


Disclaimer

Geo SCADA Expert 2022