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 the 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:
Example:
Conversion 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
Dim oPressure
Set oPressure = pMe.Pm("../Data/#vars/pressure")
oPressure.Value = oPressure.Value / 100
' 150 kPa / 100 = 1.5 bar