Skip to content

element.exists ​

Checks whether a leaf element exists in a dimension. To check for parent elements, use hierarchy.hasMember.

js
element.exists(dimension, name)

Parameters ​

ParameterTypeDescription
dimensionstringThe dimension's name or id.
namestringThe element's name.

Returns ​

boolean

true when the element exists, otherwise false, including when the dimension can't be found.

Examples ​

js
if (element.exists("Account", "600010")) {
    // do something
}