Update cookies preferences

Item - method of the PmaData object

The method returns object of the PmVar type that represents one variable defined on the "Data" tab.
Object Item(Variant id)
id(Variant) Specifies the variable. The value is:
- Name (String, case sensitive text, for example "d1") or
- Index (Long, zero-based index)
The PmVar object contains information about the variable (value, name, index, etc.).
If the variable does not exist, then error value (null for JavaScript or Nothing for VBScript) is returned. The global error of the INFO system is generated. For variable existence testing, it is better to use the ItemEx method.

Identifier #vars:
The reference to PmVar object can also be done directly by extending the path of the Pm method by means of the #vars identifier. This identifier can be used e.g. in the Pm method, or in the "PP - Pma object property" data binding.
For example the method Pm("/data/#vars/Temperature) returns the "Temperature" variable (PmVar object) in the data object (PmaData object).
Identifier #ext:
References to Data extensions objects in the PmVar variable can also be done directly by extending the path of the Pm method using the #ext identifier.
This can be used in the Pm method or in PP binding in the application and in panels.
For example the method pMe.Pm("/data/#vars/Temperature/#ext/al") returns the data extension with al identifier (ExtAlarmAnalog) in the "Temperature" variable (PmVar) in the data object (PmaData object).
See also:
- PmaData.ItemEx (method)
JavaScriptVBScriptSelect and copy to clipboard

var oData = pMe.Pm("/Data");
var oItem = oData.Item(0);   // Access to the object that represents the variable

// Reading the value:
var sName = oItem.Name;
var value = oItem.Value;

// Writing the value:
oItem.Value = 8;
PROMOTIC 9.0.28 SCADA system documentation MICROSYS, spol. s r.o.

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