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 21. EnumMembersInList Syntax
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 “UnitedStates”, “Connecticut” HS.AddEntityToList ”UnitedStates”, ”Massachusetts” HS.AddEntityToList ”UnitedStates”, ”RhodeIsland” HS.AddEntityToList ”UnitedStates”, ”Maine” ElseIf HS.MemberListID = 2 Then HS.AddEntityToList ”UnitedStates”, ”Connecticut” ElseIf HS.MemberListID = 3 Then HS.AddEntityToList ”UnitedStates”, ”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