HypGetChildren

Data source types: Essbase

Description

HypGetChildren() returns the children for the specified member.

Syntax

HypGetChildren (vtSheetName, vtMemberName, intChildCount, vtChildArray)

ByVal vtSheetName As Variant

ByVal vtMemberName As Variant

ByVal intChildCount As Integer

ByRef vtChildArray As Variant

Parameters

vtSheetName: For future use. Currently the active sheet is used.

vtMemberName: Specify a member name. Required Field.

intChildCount: To restrict the number of children returned.

  • ChildCount <=0. All children are returned.

  • ChildCount >0. The result set is limited to the number specified as the argument. If the result set is less than the specified argument, all result are returned.

vtChildArray: Output Result Vector that contains the list of the children. Its contents are unknown if the macro fails.

Return Value

Returns 0 if successful; otherwise, returns the appropriate error code.

Example

Declare Function HypGetChildren Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtMemberName As Variant, ByVal intChildCount As Integer, ByRef vtChildNameArray As Variant) As Long

Sub Sample_HypGetChildren
   Dim vtChildren as Variant
   Dim vtChild as Variant
   Dim X as Long
      X = HypGetChildren (Empty, "Market", 0, vtChildren)
      If IsArray (vtChildren) Then
         For i = LBound (vtChildren) To UBound (vtChildren)
         VtChild = vtChildren (i)
      Next
   End If
End Sub