Skip to content

hierarchy.hasMember ​

Checks whether an element exists in a hierarchy.

js
hierarchy.hasMember(dimension, hierarchy, member)

Parameters ​

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

Returns ​

boolean

true when the element is in the hierarchy, otherwise false.

Examples ​

js
if (hierarchy.hasMember("Account", "Profit and Loss", "Operating Expenditure")) {
    // do something
}