onUserItemAction - event of the PmaAlarmGroup object

The event is triggered when selecting the corresponding action in the state viewer by the local/net user.
pMe(Object) Reference to the PmaAlarmGroup object where the event rises.
pEvent(Object) Reference to object describing detailed information about the specific event.
pEvent.Action - (String) Specifies the selected action over the alarm item.
ack - The user selected the acknowledgement of the selected alarm item in the state viewer.
ackall - The user selected the acknowledgement of all alarm items in the state viewer.
pEvent.ItemId - (String) The identifier of the selected alarm item (if it doesn't go about multiple operation).
pEvent.TimeOn - (Date) The rise time of the selected alarm item (if it doesn't go about multiple operation). It goes about supplementary information to the identifier of the alarm item, that allows unambiguous idenfication of the selected alarm item. If it is allowed to store inactive, unacknowledged (blue) alarms in the "Number of inactive, unacknowledged alarms (blue) to keep" configurator, then more alarm items can have the same identifier.
pEvent.Context - (Object) Reference to the object containing additional information about the user, that executed the action followed by calling this event. The creation and demise of the alarm is always done by the local user. The alarm acknowledgement can be executed both by local and network application user (e.g. from the Web). The user info can be used, for example, for enabling/disabling the action (if possible), or for entering the user info into the alarms.
pEvent.Context.User - Reference to the PmUser object, containing detailed information about the user (local or network), that executed the action that triggered this event.
Caution! In order to keep the subobject User value trustworthy it is necessary to exclude the pseudo-groups $ANY and $ANY_NET from the appropriate "WebRead" permission (i.e. to ensure that the user is logged in when opening the Web pages).
pEvent.Context.Language - Returns the information about the national language. Language is determined with a text identifier, e.g. "en", "de", "ru" etc. - see Fully supported languages in the PROMOTIC system. See the "PmaRoot > Application > Main language of runtime" configurator.
pEvent.Enabled - (Boolean) Specifies whether the required action is performed over the selected alarm item or not.
true (default) - Alarm system performs the selected action over the selected alarm item.
false - Alarm system doesn't perform the selected action over the selected alarm item.
See also:
We will write every change of each item connected with the logged-in user into the Debug item of the INFO system:
JavaScriptVBScriptSelect and copy to clipboard

Pm.Debug("Alarm - Action=" + pEvent.Action + ", itemId=" + pEvent.ItemId + ", -> user=" + pEvent.Context.User.Id + ", Time=" + Now());

Obtains the name of confirmed item of the PmaData object having ExtAlarmBinary Data extensions. Also the name of logged in user that confirmed such alarm item.
JavaScriptVBScriptSelect and copy to clipboard

var sVarName, sUserName;
var oItem = pMe.Item(pEvent.ItemId);
var oExt = oItem.Extension();

if (oExt)
sVarName = oExt.Var.Name;
sUserName = pEvent.Context.User.Name;
PROMOTIC 9.0.17 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice