GetDefaultParent

Returns the member ID of a given member’s default parent.

Syntax

<HFMwDimension>.GetDefaultParent (lMemberID)

Argument

Description

lMemberID

The member ID of the member.

Input argument. Long subtype.

Return Value

Returns the member ID of the default parent.

Example

The following function returns the label of a member’s default parent. The function takes the member’s label and the ID of the member’s dimension.

Function getDefaultParentLabel(lDim, sMem)
Dim cMetadata, cDimension, lMem, lPar, sPar
'g_cHFMSession is an HFMwSession object reference
Set cMetadata = g_cHFMSession.metadata
'Set the HFMwDimension object reference for the specified dimension
Set cDimension = cMetadata.dimension(lDim)
lMem = cDimension.GetMemberID(sMem)
lPar = cDimension.GetDefaultParent(lMem)
sPar = cDimension.GetMemberLabel(lPar)
getDefaultParentLabel = sPar
End Function