RegisterNew - method of the PmaEventGroup object
Description:
The dynamic creation of a new event item (the
PmEventItem object) in the
inactive state (green). Method returns the created event item. The reference can be obtained also by calling the
Item method.
Syntax:
Object RegisterNew(String sId, String sTemplate, [String sSource], [String sDesc])
Parameters:
sId | (String) The unique text identifier of the new event item. This identifier is used for calling methods, for example: Activate, Item, etc. |
sTemplate | (String) The unique text identifier of the event item of template type (see the "Template for dynamically created items" configurator), whose configuration is used. |
sSource | [optional](String) The specification of the source of the event item. It allows the user to sort and filter event items in the event history viewer in the running application according to the specified source. If not set, then the template value is used. |
sDesc | [optional](String) The description itself of the event item. The basic text of the event item that is displayed in the event history viewer in the running application. If not set, then the template value is used. |
---|
Return values:
Returns the newly created object of the
PmEventItem type. In the case of an error, it returns the value
null for JavaScript or
Nothing pro VBScript (probably the item with the set
Id already exists).
Nothing value can be tested by VBScript
Is operator.
Example:
JavaScriptVBScriptSelect and copy to clipboard
var oEv = pMe.Pm("/Event");
var oEvItem = oEv.RegisterNew("T1_HI", "HI", "Boiler", "T1 over high limit");
Dim oEv
Set oEv = pMe.Pm("/Event")
Dim oEvItem
Set oEvItem = oEv.RegisterNew("T1_HI", "HI", "Boiler", "T1 over high limit")