Previous Topic: getTouchpointsNext Topic: getValueMapFields


getValueFromValueMapArray()

The getValueFromValueMapArray returns one field or column from an array that is based on the provided parameters.

Syntax

getValueFromValueMapArray(groupName, arrName, fieldName, fieldValue, requiredFieldName)

Arguments

groupName (String)

Defines the name of the Custom Group that you publish.

arrName (String)

Defines the name of a C2OValueMap array.

fieldName (String)

Defines the name of the field for which to retrieve the values of other columns or fields in an array.

fieldValue (String)

Defines the actual value of the field for which you retrieve the values of other columns or fields in an array.

requiredFieldName (String)

Defines the name of the field or column that you require. For example, username, password, or URL.

Return Value

The return value is a C2OValue Return Type.

Example

Consider a group named DemoGroup and an array as the following illustration shows:

Function getValueFromValueMap Array

The following syntax retrieves the value of the mUsername field from the array for the named connection DemoGroup:

getValueFromValueMapArray("DemoGroup", "MailServerCredentials", "mNamedConnection", "demo", "mUsername")

The output is a C2OValue where: