Update cookies preferences
Promotic

WndHistory - method of the PmaEventGroup object

Description:
Operations with panel of the event history viewer.
Syntax:
Boolean WndHistory(Long nOper, [String sFilter])
Parameters:
nOper(Long) Type of the operation with the window
0 - Close the window. The method returns true if the window has actually been closed (it was opened before that).
1 - Open the window. The method returns true if the window has actually been opened (it was closed before that).
2 - Test of opening the window. The method returns true if the window is opened.
sFilter[optional] (String) Filtering text that specifies which events are to be included into the desired output.
Different filtration fields can be used simultaneously, the event then must comply with all of them (e.g. "desc:FIQ100;priority.ge:5;").
The filtering text xx cannot be empty string (e.g. it is not possible to enter "desc:;").
Entries are in the KeyVal format, for example "desc:Test2;records:50;".
 
The folowing types of filtration texts exist ("field" represents some of events column):
"field:xx;" means that the corresponding event field must be equal to the value of xx.
"field:#eq:xx;" means that the corresponding event field must be equal to the value of xx. If the corresponding event field is to be equal to one of several texts, then can be entered multiple texts separated by #or:.
"field:#begin:xx;" means that the corresponding event field must begin with the text xx. If the corresponding event field is to begin with some of several texts, then can be entered multiple texts separated by #or:.
"field:#in:xx;" means that the corresponding event field must contain the text xx. If the corresponding event field is to contain some of several texts, then can be entered multiple texts separated by #or:.
"field:#le:xx;" means that the corresponding event field must be less or equal to xx.
"field:#ge:xx;" means that the corresponding event field must be greater or equal to xx.
 
Note! If the field begins with the text s., then this is the setting hidden from the enduser in the event history viewer and serves for setting the definite script filtration independently on end user settings. Both filtration type fields can be used for a single column simultaneously. In order to let the event pass the filter it must comly to both filtering fields. This can be handy for definite script filtrations (independent on enduser) and also for setting the initial state of user defined filtration (can be modified by the enduser). For example s.source:#begin:Boiler;source:Boiler1;.
 
"area:#oper:xx;" (optional) - Displays events with area observing the defined operation #oper:xx. The part of the filter dependent on user setting in the event history viewer.
For example "area:BoilerPlant1;" or "area:#eq:BoilerPlant1;" or "area:#eq:BoilerPlant1#or:BoilerPlant2;" or "area:#begin:BoilerPlant;".
"s.area:#oper:xx;" (optional) - Displays events with area observing the defined operation #oper:xx. The part of the filter hidden from the user in the event history viewer.
For example "s.area:BoilerPlant1;" or "s.area:#eq:BoilerPlant1;" or "s.area:#eq:BoilerPlant1#or:BoilerPlant2;" or "s.area:#begin:BoilerPlant;".
"source:#oper:xx;" (optional) - Displays events with source observing the defined operation #oper:xx. The part of the filter dependent on user setting in the event history viewer.
For example "source:Boiler;" or "source:#eq:Boiler;" or "source:#eq:Boiler1#or:Boiler2;" or "source:#begin:Boiler;".
"s.source:#oper:xx;" (optional) - Displays events with source observing the defined operation #oper:xx. The part of the filter hidden from the user in the event history viewer.
For example "s.source:Boiler;" or "s.source:#eq:Boiler;" or "s.source:#eq:Boiler1#or:Boiler2;" or "s.source:#begin:Boiler;".
"desc:#oper:xx;" (optional) - Displays events with description (desc) observing the defined operation #oper:xx. The part of the filter dependent on user setting in the event history viewer.
For example "desc:FIQ101;" or "desc:#eq:FIQ101;" or "desc:#eq:FIQ101#or:FIQ102;" or "desc:#begin:FIQ;".
"s.desc:#oper:xx;" (optional) - Displays events with description (desc) observing the defined operation #oper:xx. The part of the filter hidden from the user in the event history viewer.
For example "s.desc:FIQ101;" or "s.desc:#eq:FIQ101;" or "s.desc:#eq:FIQ101#or:FIQ102;" or "s.desc:#begin:FIQ;".
"comment:#oper:xx;" (optional) - Displays events with comment observing the defined operation #oper:xx. The part of the filter dependent on user setting in the event history viewer.
For example "comment:correction;" or "comment:#eq:correction;" or "comment:#eq:correction#or:test;" or "comment:#begin:correction;".
"s.comment:#oper:xx;" (optional) - Displays events with comment observing the defined operation #oper:xx. The part of the filter hidden from the user in the event history viewer.
For example "s.comment:correction;" or "s.comment:#eq:correction;" or "s.comment:#eq:correction#or:test;" or "s.comment:#begin:correction;".
"s.usernote:#oper:xx;" (optional) - Displays events with usernote observing the defined operation #oper:xx. The part of the filter hidden from the user in the event history viewer.
For example "s.usernote:correction;" or "s.usernote:#eq:correction;" or "s.usernote:#eq:correction#or:test;" or "s.usernote:#begin:correction;".
"priority:#oper:xx;" (optional) - Displays events whose priority observing the defined operation #oper:xx. The part of the filter dependent on user setting in the event history viewer.
For example "priority:5;" or "priority:#eq:5;" or "priority:#le:5;" or "priority:#ge:5;".
"from:xx;" (optional) - Displays the events with time of creation (timeon) greater or equal to time "xx". The time is entered in the form time(YYYY.MM.DD-hh:mm:ss.mmm), e.g. "from:time(2024.07.28-14:30:00.000);". The Time-range allows to narrow down the searched event set (events outside the time-range are not tested).
"to:xx;" (optional) - Displays the events with time of creation (timeon) less or equal to time "xx". The time is entered in the form time(YYYY.MM.DD-hh:mm:ss.mmm), e.g. "to:time(2024.07.28-15:00:00.000);".
The to time can be entered also by the now keyword, which means the current time (at the moment of calling), e.g. to:now.
The Time-range allows to narrow down the searched event set (events outside the time-range are not tested).
"timerange:xx;" (optional) - Displays the events with the creation time (timeon) belonging to specified time-range For selecting the time span by timerange, the value of either from or to must be defined, where the timerange allows to compute the missing limit of the time-range. Thus the time-range can be defined by the following pairs: from - to, from - timerange or to - timerange. For example to:now;timerange:30m;. Time-range allows to reduce the portion of event items to be searched (events outside the time-range are not tested).
The time-range can be entered as integer followed by time unit sign (without space). Valid time units are: w = week, d = day, h = hour, m = minute, s = second. For example timerange:12h; or timerange:90m;.
Note:
The WndHistory method opens the viewer always in new independent window.
Example:
Opening the viewer of the event history, for example in the panel button in the onButtonUp event. "/events" is the path to the PmaEventGroup object.
JavaScriptVBScriptSelect and copy to clipboard

var oEv = pMe.Pm("/Event");
oEv.WndHistory(1);
it is better to use the CreateView method:
JavaScriptSelect and copy to clipboard

var oCreator = Pm.CreateView(null, "/Event/#history", "", "target:_blank.events");
oCreator.Open();
PROMOTIC 9.0.28 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.