Promotic
WikipediaLinkedInYoutubeTwitterFacebook

onAddRecord - event of the PmaTrendGroup object

Description:
The event is triggered on the request for saving the values (in the form of new record), but before the saving is done. This event can be used for preparing the data to be saved.
Parameters:
pMe(Object) Reference to the PmaTrendGroup object where the event rises.
pEvent(Object) Reference to object describing detailed information about the specific event.
The pEvent parameter is not used here because this event does not need any additional information.
Note:
The record saving request can be triggered:
- automatically by the internal timer (see the "Automatic saving after launch is enabled" configurator) or
- by calling the Run or RunTime methods.
Example:
Convert trend unit before saving. The value je obtained by data extension ExtTrend of the PmaData object.
JavaScriptVBScriptSelect and copy to clipboard

var oPressure = pMe.Pm("../Data/#vars/pressure");
oPressure.Value = oPressure.Value / 100;  //150 kPa / 100 = 1.5 bar

History:
Pm8.00.04: Created
PROMOTIC 9.0.16 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