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
| Parameter | Type | Description |
|---|---|---|
dimension | string | The dimension's name or id. |
name | string | The element's name. |
Returns
booleantrue when the element exists, otherwise false, including when the dimension can't be found.
Examples
js
if (element.exists("Account", "600010")) {
// do something
}