EnumMembers

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

Note:

You can return members from a dynamic member list with EnumMembers2.

Syntax

<HFMwDimension>.EnumMembers (varOBPScenario, varOBPYear, varOBPPeriod, varMemberlist, varTopMember, lStartingIndex, lMaxMembers, lFlagsRequestedInfo, pvaravarlMemberIDs, pvaravarlParentIDs, pvaravarbstrMemberLabels, pvaravarbstrDescriptions, pvaravarlNumChildren, 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. An ID must be cast as a Long subtype.

  • For non-Organization by Period enumerations, pass the HFMConstants type library constant MEMBERNOTUSED.

Input argument.

varOBPYear

Pass one of the following:

  • For Organization by Period enumerations, pass the member ID or label of the Year dimension member. An ID must be cast as a Long subtype.

  • For non-Organization by Period enumerations, pass the HFMConstants type library constant MEMBERNOTUSED.

Input argument.

varOBPPeriod

Pass one of the following:

  • For Organization by Period enumerations, pass the member ID or label of the Period dimension member. An ID must be cast as a Long subtype.

  • For non-Organization by Period enumerations, pass the HFMConstants type library constant MEMBERNOTUSED.

Input argument.

varMemberlist

The ID or label of the member list.

Note:

An ID must be cast as a Long subtype.

Input argument.

varTopMember

The member ID or label of the top member in the hierarchy with which to begin enumerating. To start enumerating at the top of the hierarchy, pass either -1 or an empty string.

Note:

An ID must be cast as a Long subtype.

Input argument.

lStartingIndex

The starting index (base 0) within the enumeration for retrieving member information.

Input argument. Long subtype.

lMaxMembers

The maximum number of members to return. To return all child members, pass 0.

Input argument. Long subtype.

lFlagsRequestedInfo

Specifies the type of information to return. Valid values for the bits are represented by the HFMConstants type library constants listed in Metadata Information Constants.

Input argument. Long subtype.

pvaravarlMemberIDs

If WEBOM_METADATA_INFO_ID or WEBOM_METADATA_INFO_ALL is included in the lFlagsRequestedInfo argument’s bitmask, this returns an array of member IDs.

Output argument.

pvaravarlParentIDs

If EnumMembers is called for the entity dimension, and WEBOM_METADATA_INFO_ID or WEBOM_METADATA_INFO_ALL is included in the lFlagsRequestedInfo argument’s bitmask, this returns an array of member IDs for the parents of the list’s members.

Output argument.

pvaravarbstrMemberLabels

If WEBOM_METADATA_INFO_LABEL or WEBOM_METADATA_INFO_ALL is included in the lFlagsRequestedInfo argument’s bitmask, this returns an array of the labels of the list’s members.

Output argument.

pvaravarbstrDescriptions

If WEBOM_METADATA_INFO_DESCRIPTION or WEBOM_METADATA_INFO_ALL is included in the lFlagsRequestedInfo argument’s bitmask, this returns an array of the descriptions of the list’s members.

Output argument.

pvaravarlNumChildren

If WEBOM_METADATA_INFO_NUMCHILDREN or WEBOM_METADATA_INFO_ALL is included in the lFlagsRequestedInfo argument’s bitmask, this returns an array indicating the number of child members for each enumerated member.

Output argument.

pvarlTotalMembersInEnum

Returns the total number of members in the list.

Output argument.

Return Value

Returns a count of the members returned by this method.

Example

The following function returns the names of the entities that belong to a member list.

Function getEntitiesInMemList(sList)
Dim cMetadata, cEntities, cDimension, lCount
Dim vaIDs, vaParIDs, vaLabels, vaDescs, vaKids, lTotal
'g_cSession is an HFMwSession object reference
Set cMetadata = g_cSession.metadata
Set cEntities = cMetadata.entities
Set cDimension = cEntities.dimension
lCount = cDimension.EnumMembers(MEMBERNOTUSED, MEMBERNOTUSED, _ 
  MEMBERNOTUSED, sList, "", 0, 0, WEBOM_METADATA_INFO_LABEL, _ 
  vaIDs, vaParIDs, vaLabels, vaDescs, vaKids, lTotal)
getEntitiesInMemList = vaLabels
End Function