EnumMembersInList

You use the EnumMembersInList subroutine to add members to a list. For a static member list, you list all members of the list in the script. Within the EnumMembersInList () subroutine, you use the syntax and functions in this table to define the members of each member list:

For all dimensions except Entity, you use the HS.AddMemberTo List statement, in which you must specify a member. For the Entity dimension, you use the HS.AddEntityToList statement, in which you must specify a member and its parent.

Table 5-1 EnumMembersInList Syntax

Syntax Description

HS.Dimension = " Element "

where Element is the dimension. For example:

If HS.Dimension = "Entity" Then

HS.MemberListID=n

Specifies the member list by its numeric ID

where n = numeric ID assigned to the member list in the EnumMemberLists subroutine

HS.MemberListID = 1

HS.AddEntityToList Member

HS.AddMemberToList Member

Adds members to a list for dimensions other than Entity

where Member is the member name

HS.AddEntityToList "UnitedStates,"
                        "Maine"
                     
HS.AddMemberToList "July"
                     

HS.AddEntityToList Parent, Member

Adds members to a list for the Entity dimension

where Parent is the parent of the member that you are adding, and Member is a member of the Entity dimension.

HS.AddEntityToList "UnitedStates", "California"
                     

HS.Entity.List

Adds members to a list for the Entity dimension

HS.Entity.List(""
                        "[Base])"
                     

HS.MemberListEntity HS.MemberListScenario HS.MemberListYear HS.MemberListPeriod

Use to specify a dynamic member list.

This section shows a sample of the EnumMembersInList section of the file. In this example, the entities for three entity lists are defined. The members of the Account list are also defined.

Sub EnumMembersInList()
If HS.Dimension = "Entity" Then
   If HS.MemberListID = 1 Then
      HS.AddEntityToList "United States", "Massachusetts"
         
      HS.AddEntityToList "United States", "Rhode Island"
         
      HS.AddEntityToList "United States", "Maine"
         
   ElseIf HS.MemberListID = 2 Then
      HS.AddEntityToList ,"United States" 
            "Connecticut"
         
   ElseIf HS.MemberListID = 3 Then
      HS.AddEntityToList "United States", "California"
         
   End If
ElseIf HS.Dimension = "Account" Then
   If HS.MemberListID = 1 Then
      HS.AddMemberToList "Sales"
         
      HS.AddMemberToList "Purchases"
         
      HS.AddMemberToList "Salaries"
         
      HS.AddMemberToList "OtherCosts"
         
      HS.AddMemberToList "TotalCosts"
         
      HS.AddMemberToList "GrossMargin"
         
      HS.AddMemberToList "HeadCount"
         
      HS.AddMemberToList "AdminExpenses"
         
      HS.AddMemberToList "InterestCharges"
         
      HS.AddMemberToList "NetIncome"
         
      HS.AddMemberToList "Taxes"
         
      HS.AddMemberToList "NetProfit"
         
   End If
End If
End Sub

Note:

You can have as many member lists for each dimension as you need, and you do not need to create member lists for all dimensions.