hierarchy.exists
Checks whether a hierarchy exists.
js
hierarchy.exists(dimension, hierarchy)Parameters
| Parameter | Type | Description |
|---|---|---|
dimension | string | The dimension's name or id. |
hierarchy | string | The hierarchy's name. |
Returns
booleantrue when the hierarchy exists, otherwise false, including when the dimension can't be found.
Examples
js
if (hierarchy.exists("Account", "Profit and Loss")) {
// do something
}