Creator Help

Create Map

Table of ContentsDown

Create Map

The Create Map deluge syntax creates a new empty map expression. If the target map variable is already defined as map variable, then all its content will be erased. The map expression related tasks (put, putAll, remove, clear) and opertions can be done only if the map variable is defined.

map() - map constructor to create and initalize map variable.
{} - Holds map values. Handy syntax for creating map with some initial values.
Example:  hdrs = { "Email" : "", "Passwd" : "mypassword", "accountType" : "HOSTED_OR_GOOGLE", "service" : "cl" };


In the following sample code, a map named map1 is defined in the on add -> on load block and initialized with the map() constructor.

on add
on load

map1 = map(); // map constructor to initalize the map variable named map1.
              // Following is map constructor to declare a variable with default values
               hdrs = { "Email" : "", "Passwd" : "mypassword", "accountType" : "HOSTED_OR_GOOGLE", "service" : "cl" };