Create map

Create map

Table of Contents

Overview

The create map deluge task is used to declare a map variable.

Syntax

To declare a map variable

<variable> = Map();

To create a map variable with key value pairs

<variable> = {<key1><value1>, <key2>: <value2> ...... <keyN>: <valueN>} ;
ParameterDescription
<variable>

Variable which will hold the key-value pairs.

<key>

Key to hold a value.

You can directly specify a key, or a variable, or a field value in the format input.<field_name>, or an expression, i.e. a combination of values, constants, variables, operators, functions and so on.

Keys must be unique. If an existing key is specified again, the newly specified value will overwrite the existing value of that key, and a new key-value pair will not be appended.

If a date value is specified without a time value, 00:00:00 will be added as the time value by default.

Keys can be of any data-type

<value>

Value to be assigned to the key.

You can directly specify a value, or a variable, or a field value in the format input.<field_name>, or an expression, i.e. a combination of values, constants, variables, operators, functions and so on.

If a date value is specified without a time value, 00:00:00 will be added as the time value by default.

Values can be of any data-type.

This task can be used in the following events

When a record is Created
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Created or Edited
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Edited
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Deleted
On ValidateYes
On SuccessYes
Other workflow events
On a scheduled dateYes
During approval processYes
During payment processYes
In a Custom FunctionYes
In an Action item in reportYes

Examples

1) The following snippet creates a map variable with keys as "Product" and "Current Version", and values as "ZohoCreator" and 5 respectively.

mapVal={"Product":"ZohoCreator","Current Version":5};

2) The following snippet creates a map variable with a single key and a list a of its values.

mapVal={"Products":{"Zoho Creator","Zoho Chat","Zoho CRM"}};

3) The following snippet creates a map variable with one key-value pair and another key with list of values.

mapVal={"Company":"Zoho","Products":{"Zoho Creator","Zoho Chat","Zoho CRM"}};

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com