hierarchy.hasMember
Checks whether an element exists in a hierarchy.
js
hierarchy.hasMember(dimension, hierarchy, member)Parameters
| Parameter | Type | Description |
|---|---|---|
dimension | string | The dimension's name or id. |
hierarchy | string | The hierarchy's name or id. |
member | string | The element's name. |
Returns
booleantrue when the element is in the hierarchy, otherwise false.
Examples
js
if (hierarchy.hasMember("Account", "Profit and Loss", "Operating Expenditure")) {
// do something
}