hierarchy.removeChild
Removes an element from under one parent. If that was its only parent, it and everything below it are left out of the hierarchy (potentially orphaned).
js
hierarchy.removeChild(dimension, hierarchy, parent, child)Parameters
| Parameter | Type | Description |
|---|---|---|
dimension | string | The dimension's name or id. |
hierarchy | string | The hierarchy's name or id. |
parent | string | The parent element's name. |
child | string | The child element's name. |
Returns
booleantrue when the child was removed, otherwise false, including when the child isn't under that parent.
Examples
js
hierarchy.removeChild("Account", "Profit and Loss", "Revenue", "Other Sales");