GetNameOfRecord

(Alarm Manager module)

Description: Given an alarm record, returns the tag name.
Returns: Text
Usage: Script Only.
Function Groups: Alarm
Related to: GetAlarmObject
Format: \AlarmManager.GetNameOfRecord(AlarmRecord[, ParentTag])
Parameters:  
AlarmRecord
Required record. A reference to the alarm, as returned by the function GetAlarmObject.
ParentTag
Optional. The parent tag's name. If valid, this value will be stripped from the result.
Comments:

This function is intended primarily for presentation purposes.

The function will return whichever of the following, in order, for which it can find a valid value: the relative tag name, the full name, or the unique ID (alarm name).

Example:

 { Given an array of alarm records, get the tag object from the alarm name whenever
   the array index, SelRecord, changes.  }
  If Watch(1, Records[SelRecord]\GUID);
  [
    \AlarmManager.GetAlarmObject(Records[SelRecord]\Name, &Root);
    ShortName = \AlarmManager.GetNameOfRecord(Records[SelRecord]);
  ]