Skip to content

hierarchy.exists ​

Checks whether a hierarchy exists.

js
hierarchy.exists(dimension, hierarchy)

Parameters ​

ParameterTypeDescription
dimensionstringThe dimension's name or id.
hierarchystringThe hierarchy's name.

Returns ​

boolean

true 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
}