GetUserNameOfRecord
(Alarm Manager module)
| Description: | Given an alarm record, returns the user name associated with the transaction. |
| Returns: | Text |
Usage: ![]() |
Script Only. |
| Function Groups: | Alarm |
| Related to: | GetAlarmList | GetAlarmObject |
Format: ![]() |
\AlarmManager.GetUserNameOfRecord(AlarmRecord[, TrimRealm]) |
| Parameters: |
| AlarmName |
| Required record. A reference to the alarm, as returned by the function GetAlarmObject. |
| TrimRealm |
| Optional Boolean. If TRUE, and if the user is a member of a security group, the realm (group) will be trimmed from the result. |
| Comments: |
This function is intended primarily for presentation purposes. |
Example:
[
NRecords;
Records;
Done;
Progress;
AlarmAckedBy;
]
Init [
If 1 WaitResults;
[
\AlarmManager.GetAlarmList(&Records, &NRecords, "History" { History list },
TRUE { Snapshot and done }, TRUE { Include shelved },
FALSE { No configuration records },
"Record\Action == ""Ack""" { Filter for Ack events },
Invalid, Invalid, FALSE { No calculated fields },
CurrentTime(1) - 7200, CurrentTime(1) { Records for the last two hours },
100 { Limit to 100 records } , &Done, &Progress);
]
]
WaitResults [
If Done Main;
[
{ Starting with the most recent...}
AlarmAckedBy = \AlarmManager.GetUserNameOfRecord(Records[0]);
