Promotic
Login logon

mapSetValueAt - method of the PmMap object

Description:
Sets the value of selected object property (creates the corresponding property if needed).
Syntax:
Empty mapSetValueAt(String sProp, Variant vValue)
Parameters:
sProp(String) Property name.
vValue(Variant) Value that will be assigned to property.
Note:
This method is also functional in Web panels.

The property can be created and/or value can be set directly (mMap.property = value). This method can be used for more general approach - for example the property name can be stored in another variable.
In the Web panel that is written in the VBScript language it is necessary to use this method to create properties. In this case it is not possible to create property just by assigning the value.

If the value undefined (JavaScript) or Empty (VBScript) is written to the map, then the given property is deleted from the map."
See also:
Example:
JavaScriptSelect and copy to clipboard

var mMap = Pm.CreatePmMap();
mMap.mapSetValueAt("Temperature", 85);
var nVal = mMap.mapGetValueAt("Temperature");   // nVal = 85

History:
Pm8.03.04: Created
PROMOTIC 9.0.34 SCADA system documentation MICROSYS, spol. s r.o.

Send page remark Contact responsible person
© MICROSYS, spol. s r.o.Update cookies preferences