Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Item - property of object PmCommData

Description:
The property enables an access to the object of Var type that represents one variable defined on the page Data.
Syntax:
Item(id As Variant) As Object
Calling:
Reading the value:
val = oCommData.Item(id).Value
Writing the value:
oCommData.Item(id).Value = val
Parameters:
id(Variant) Identification of the variable either by its name (String data type, case sensitive text, for example "a1") or by index (zero-based index).
Note:
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, it 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 doesn't exist, then Nothing value is returned. The global error in the INFO system is generated. For variable existence testing, it is better to use the ItemEx property.

This method enables access only to variables (with corresponding data extension) that are created directly in this object (own variables). In fact also other variables from PmData objects are registered into this object - those that have corresponding data extension configured with path to this object. All data extensions registered in this object can be accessed by method GetVarExtensions.

Example:
The Item property returns the reference to the Var type object. In this case this object has the following properties Value and Quality that can be find out, for example, as follows:
Dim val, qual
val = oCommData.Item(0).Value
qual = oCommData.Item(0).Quality
PROMOTIC 8.3.23 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