Object
The Alarm.SelectedAlarms and Alarm.Alarms properties both return an alarm collection and each alarm in the collection has an Object property. The Object property represents the item for which the alarm was raised and it has the same properties as other similar object properties, such as the serverobject that is returned by the Server.FindObject function.
Syntax |
Object |
Description |
Represents the database item for which the returned alarm has been raised. |
Arguments |
None. |
Returns |
ServerObject A reference to an item in the database. The returned ServerObject has its own ServerObject Functions and ServerObject Properties. |
Example:
In this example, Alarm.Object.Fullname is used to return the Fullname property of the item for which the selected alarm has been raised. In this case, the Fullname property is displayed on a message box along with various other alarm information.
- Function ShowAlarmInfo( Alarm )
- MsgBox "One Alarm Selected", "Severity " & Alarm.SeverityDesc & ", Time " & Alarm.Time & ", logged on user name " & Alarm.Server.Username & ", Object name " & Alarm.Object.Fullname
- End Function