ItemEx - property of object PmData

The property enables an access to the object of Var type that represents one variable defined on the page Data. The variable is there defined by the index parameter..
ItemEx(index As Variant, nAttr As Long) As Object
Reading the value:
val = oData.ItemEx(index).Value
Writing the value:
oData.ItemEx(index).Value = val
Access to the object that represents the variable:
Set obj = oData.ItemEx(index)
index(Variant) Identification of the variable either by its name (String data type, case sensitive text, for example "a1") or by the index (zero-based index).
nAttr(Long) Enables to change the behavior of the method.
0 (default) - default behavior (as Item property).
1 - when referencing the non-existent variable the global error in the INFO system won't be generated.
Property access for read only.

The Var object includes information about the variable (value, name, index, etc.).

The Item property (like Var object) is read only, which means that the object cannot be changed but for example it is possible to write into the Value of the Var object.

If the variable does'nt exist, Nothing value is returned. Nothing value can be tested by VBScript Is operator.

Identifier #vars:The reference to Var object can also be done directly by extending the path of the Pm method using the #vars identifier. This identifier can be used in methods working with application object tree (e.g. for the Pm method), or for the PP binding in the application and in panels. For example the method Pm("/data/#vars/Temperature) returns the "Temperature" variable (Var) in the "data" object(PmData).
Identifier #ext: References to Data extensions objects in the Var variable can also be done directly by extending the path of the Pm method using the #ext identifier. This can be used in Pm method or in PP binding in application and in panels. For example the pMe.Pm method ("/data/#vars/Temperature/#ext/al") returns the data binding with al identifier (ExtAlarmAnalog) in the "Temperature" variable (Var) in the "data" object (PmData).
See also:
Testing whether the variable named "Temperature3" exists:
If oData.ItemEx("Temperature3", 1) Is Nothing Then
  ' ... error
End If
PROMOTIC 8.3.19 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