Les listes de membres de PDV dynamiques sont créées de manière dynamique en fonction du membre de PDV actuel d'une ou plusieurs dimensions.
Les sections en gras de cet exemple de fichier de listes de membres correspondent aux sections PDV.
Sub EnumMemberLists()
Dim EntityLists(5)
If HS.Dimension = "Entity"Then
EntityLists(1) = "AllEntities"
EntityLists(2) = "AppCur"
EntityLists(3) = "NoappCur"
EntityLists(4) = "Global(@POV)"
EntityLists(5) = "POWN(@POV)"
HS.SetMemberLists EntityLists
End If
End Sub
Sub EnumMembersInList()
If HS.Dimension = "Entity" Then
If HS.MemberListID = 1 Then
HS.AddEntityToList "","Corp_Ops"
HS.AddEntityToList "","China"
HS.AddEntityToList ,"","Germany"
HS.AddEntityToList "","UK"
End If
EntList=HS.Entity.List("","")
AppCur=HS.AppSettings.Currency
For each Ent in EntList
If HS.Entity.DefCurrency(Ent)=AppCur Then
If HS.MemberListID = 2 Then HS.AddEntityToList "",Ent
ElseIf Ent<>"[None]" Then
If HS.MemberListID = 3 Then HS.AddEntityToList "",Ent
End If
Next
ScenPOV=HS.MemberListScenario
YearPOV=HS.MemberListYear
PerPOV=HS.MemberListPeriod
EntPOV=HS.MemberListEntity
If HS.MemberListID = 4 Or HS.MemberListID = 5 Then
If ( EntPOV <> "") Then
EntList=HS.Node.List("E#" & EntPOV,"[Descendants]", "S#" & ScenPOV & "..Y#" & YearPOV & ".P#" & PerPOV)
If IsArray(EntList) Then
For each Ent in EntList
If Ent <> "[None]" Then
If HS.Node.Method("S#" & ScenPOV & ".Y#" & YearPOV & ".P#" & PerPOV & ".E#" & EntPOV & "." & Ent)="GLOBAL" Then
If HS.MemberListID = 4 Then HS.AddEntityToList "",Ent
End If
If HS.Node.POwn("S#" & ScenPOV & ".Y#" & YearPOV & ".P#" & PerPOV & ".E#" & EntPOV & "." & Ent) > 0.5 Then
If HS.MemberListID = 5 Then HS.AddEntityToList "",Ent
End If
End If
Next
End If
End If
End If
End Sub