Promotic
WikipediaLinkedInYoutubeTwitterFacebook

mapSetSubmapAt - method of object PmMap

Description:
Returns an embedded Submap. If the embedded map does not exist then it is created.

All items defined in the sSubmap parameter in the KeyVal format are added into the embedded Submap.

Syntax:
PmMap mapSetSubmapAt(String sProp, String sOper, String sSubmap)
Calling:
val = oMap.mapSetSubmapAt(sProp);
Parameters:
sProp(String) Property name.
sOper(String) Specifies the type of operation - this is not used so far. It is necessary to enter "" (empty string).
sSubmap(String) The text string containing definitions of property names and values.

The text string syntax is: "Name1:Value1;Name2: ... ;". This is a text in the KeyVal format.

Empty string ("") means that no new items are added into the Submapy.
Return Values:
Returns object of the PmMap type (embedded Submap).
Note:
This method is also functional in Web panels.
 
The property value can also be read directly (value = oMap.property). This method can be used for more general approach - for example the property name can be stored in another variable.
Example:
JavaScriptSelect and copy to clipboard

var oMap = Pm.CreatePmMap();
var oMap2 = oMap.mapSetSubmapAt("pars", "", "title0:ABC;value0:1;title1:XYZ;value1:2;");

Pm.Debug(oMap2.mapGetValueAt("title0"));
Pm.Debug(oMap2.mapGetValueAt("value0"));

History:
Pm9.00.09: Created
PROMOTIC 9.0.9 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