data.GetValue

This function returns the value from the mapping reference. If it is not defined, it returns the default value specified by the user.

Syntax

data.GetValue(mappingReference, default)

Arguments

Argument

Type

Description

mappingReference

Any

Variable name or path. For example:

$Activity[ActivityName].propertyName

default

Any

The default value specified by the user. If the mapping reference is not defined, this default value is returned.

Returns

Type

Description

Any

The value of the mapping reference or default value

Examples

  • If $Activity[foo].book[2].price is equal to 30, the function GetValue($Activity[foo].book[2].price, 90) returns 30.

  • If $.foo.store.addr is not defined, the function GetValue($.foo.store.addr, "Some address") returns "Some address".