Skip to content

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 ​

ParameterTypeDescription
dimensionstringThe dimension's name or id.
hierarchystringThe hierarchy's name or id.
parentstringThe parent element's name.
childstringThe child element's name.

Returns ​

boolean

true 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");