You are here: Core Reference > Coding > Scripting > Source

Source

The Alarm.SelectedAlarms and Alarm.Alarms properties both return an alarm collection and each alarm in the collection has a Source property. The Source property returns a string which represents the item for which the alarm has been raised. While the string usually contains the FullName of the database item that is the source of the alarm, it may also be unrelated to the name of the source item, for example, the source could be the string that has been defined in the Alarm Source configuration setting for a point.

Syntax

Source

Description

Returns a string that represents the database item that is the source of the alarm.

Arguments

None.

Returns

Source {String}. A string that represents the item that is the source of the alarm. Typically, this is the FullName value of the source item.

Example:

In this example, Alarm.Source is used to return the string that represents the source of the selected alarm. The string is displayed in a message box next to the text "Source", and the time of the alarm, the severity description, the alarm item’s full name, and the name of the logged on user are also shown.

  • Function ShowAlarmInfo( Alarm )
    • MsgBox "One Alarm Selected", "Severity" & Alarm.SeverityDesc & ", Time " & Alarm.Time & ", "Source" & Alarm.Source & ", logged on user name " & Alarm.Server.Username & ", Object name " & Alarm.Object.Fullname
  • End Function

ClearSCADA 2015 R2