EnumParents

Enumerates the member IDs, labels, descriptions, and number of children of the parent members of a given child member. A flag specifies which of these types of information will be returned.

Syntax

<HFMwDimension>.EnumParents (varOBPScenario, varOBPYear, varOBPPeriod, varChildMember, lStartingIndex, lMaxMembers, lFlagsRequestedInfo, pvaravarlMemberIDs, pvaravarbstrMemberLabels, pvaravarbstrDescriptions, pvaravarlNumParents, pvarlTotalMembersInEnum)

Argument

Description

varOBPScenario

Pass one of the following:

  • For Organization by Period enumerations, pass the member ID or label of the Scenario dimension member.

  • For non-Organization by Period enumerations, pass -1.

    Note:

    An ID must be cast as a Long subtype.

Input argument.

varOBPYear

Pass one of the following:

  • For Organization by Period enumerations, pass the member ID or label of the Year dimension member.

  • For non-Organization by Period enumerations, pass -1.

    Note:

    An ID must be cast as a Long subtype.

Input argument.

varOBPPeriod

Pass one of the following:

  • For Organization by Period enumerations, pass the member ID or label of the Period dimension member.

  • For non-Organization by Period enumerations, pass -1.

    Note:

    An ID must be cast as a Long subtype.

Input argument.

varChildMember

The label or member ID of the dimension member for which the parent labels are being returned.

Input argument.

lStartingIndex

Specifies the starting index (base 0) within the enumeration for retrieving parent information.

Input argument. Long subtype.

lMaxMembers

Specifies the maximum number of members to return. To return all parent members, pass 0.

Input argument. Long subtype.

lFlagsRequestedInfo

Specifies the type of information to return. Valid values are represented by the HFMConstants type library constants listed in Metadata Information Constants. You can pass more than one constant by using Or.

Input argument. Long subtype.

pvaravarlMemberIDs

If WEBOM_METADATA_INFO_ID or WEBOM_METADATA_INFO_ALL is passed to the lFlagsRequestedInfo argument, this returns an array containing the parent entities’ member IDs.

Input/output argument.

pvaravarbstrMemberLabels

If WEBOM_METADATA_INFO_LABEL or WEBOM_METADATA_INFO_ALL is passed to the lFlagsRequestedInfo argument, this returns an array containing the labels of the parent entities.

Input/output argument.

pvaravarbstrDescriptions

If WEBOM_METADATA_INFO_DESCRIPTION or WEBOM_METADATA_INFO_ALL is passed to the lFlagsRequestedInfo argument, this returns an array containing the descriptions of the parent entities.

Input/output argument.

pvaravarlNumParents

If WEBOM_METADATA_INFO_NUMCHILDREN or WEBOM_METADATA_INFO_ALL is passed to the lFlagsRequestedInfo argument, this returns an array indicating the number of child members for each enumerated member.

Input/output argument.

pvarlTotalMembersInEnum

Returns the total number of members in the enumeration.

Input/output argument.

Return Value

Returns a count of the members that are enumerated by this method.

Example

The following function returns the labels of a given Entity dimension member’s parents.

Function getEntityParents(sChild)
Dim cHFMMetadata, cHFMEntities, cDimension, lRet
Dim vaIDs, vaLabels, vaDescs, lNumParents, vaTotal
Set cHFMMetadata = cHFMSession.metadata
Set cHFMEntities = cHFMMetadata.entities
Set cDimension = cHFMEntities.dimension
lRet = cDimension.EnumParents (cLng(-1), cLng(-1), cLng(-1), _
   sChild, 0, 0,  WEBOM_METADATA_INFO_LABEL, vaIDs, vaLabels, _
   vaDescs, lNumParents, vaTotal)
getEntityParents = vaLabels
End Function