Returns arrays that contain member labels and that represent the parent-child relationships of a dimension’s members. The arrays are returned in the method’s arguments; the first argument returns the parent labels and the second argument returns the child labels.
The elements in the two arrays have a one-to-one correspondence. For example, the member identified by the parent array’s first element is the parent of the member identified by the child array’s first element.
<IHsvTreeInfo>.EnumAllParentAndChildLabels pvarabstrParents, pvarabstrChildren
Variant array. Returns the labels of the parent members. The array is returned as a String subtype. | |
Variant array. Returns the labels of the child members. The array is returned as a String subtype. |
Understanding the Arguments’ Parent-Child Arrays
To understand how the two arrays relate to each other, consider the HIERARCHIES sections of metadata load files, which are documented in the Oracle Hyperion Financial Management, Fusion Edition Administrator's Guide. HIERARCHIES sections consist of comma-delimited records, where the first field contains the parent member’s label and the second field contains the child member’s label. Consider the following example of a HIERARCHIES section:
!HIERARCHIES=Entity ,[None] ,Regional Regional,UnitedStates UnitedStates,California California,Sunnyvale California,FosterCity
This HIERARCHIES section lists six parent-child combinations for the Entity dimension. The following table enumerates the elements of the arrays that EnumAllParentAndChildLabels would return for this set of entities:
When an entity has no child, the corresponding parent array element will be an empty string; this is why the table shows no parent array element for the [None] and Regional entities.
The following example displays the names of the parent entities for the entity specified in a combo box control. The example sets an IHsvTreeInfo object reference for the Entity dimension, then calls EnumAllParentAndChildLabels to populate the vaParents and vaChildren variables with arrays. The example then loops through the vaChildren array; when an array element contains the name of the entity specified in the comboEnts combo box, the entity’s parent is concatenated to the sParents variable.
Dim cIHsvTreeInfo As IHsvTreeInfo, sParents As String
Dim vaParents, vaChildren
Set cIHsvTreeInfo = m_cMetadata.Dimension(DIMENSIONENTITY)
cIHsvTreeInfo.EnumAllParentAndChildLabels vaParents, vaChildren
For i = LBound(vaChildren) To UBound(vaChildren)
If vaChildren(i) = comboEnts.Text Then
sParents = sParents & vbCrLf & vaParents(i)
End If
Next i
MsgBox comboEnts.Text & " parents: " & sParents