|pMe||(Object) Reference to the PROMOTIC object where the event rises.|
|pEvent||(Object) A referrence to object describing detailed information about the specific event.|
pEvent.Item - (Object) The Var object containing the information about the variable, in which some writing (change) occurred
To achieve calling this event for the specific variable, it is necessary to enable the calling explicitly in the variable (see the configurator "ExtWriteAction > Data extension configuration: ExtWriteAction > Event "onItemBeforeWrite""). There it is also defined if the event fires before each writing or before each change of the value.
If the fireing is enabled for each variable and writing into (the change of) all variables occurs at a time, then the event fires for each variable separately!
The usage of this event is appropriate, for example, to filter written values. The pEvent.NewVal parameter is defined for reading and writing. If a new value is written into this parameter, then the value from the parameter is written as a matter of fact into the object variable (after ending this event).
It is recommended to use this event only for special cases. When this event is enabled, the values are written asynchronously, i.e. this event does not execute the write command instantly, but later, after the active script is finished.
The event fires only if the real writing is performed (e.g. object.Item(0)=3) into the variable - let's mark it A. But if the data binding (during the reading) to another variable B (in another object) is defined in the variable A and it is written into the variable B, then the variable A doesn't know about the change and thus the event not fires (the variable A does know about the change only when it is read by someone - data binding is then "performed" - but the event not fires again !).