5 Replies Latest reply on Dec 29, 2018 4:23 PM by user6692921

    Dynamic POV memberlist ICP for Data entry form

    2937340

      Hi,

       

      I'm trying to create a Dynamic POV memberlist for the dimension  ICP.

       

      this is the code I'm using for my purpose:

       

      ScenPOV=HS.MemberListScenario
      YearPOV=HS.MemberListYear
      PerPOV=HS.MemberListPeriod
      EntPOV=HS.MemberListEntity

       

      'DYNAMIC(@POV) ICP_Attive
      If HS.MemberListID = 1 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]" and HS.Entity.IsDescendant("GRP_OLD",Ent) = FALSE Then
                            If Hs.MemberListID = 1 then

       

      If Ent = "GRP.A01"  then
      Hs.AddMemberToList "AAA"
      Hs.AddMemberToList "AAB"
      Hs.AddMemberToList "AE1"
      Hs.AddMemberToList "E49"
      Hs.AddMemberToList "FE1"
      Hs.AddMemberToList "FE2"
      Hs.AddMemberToList "FE3"
      Hs.AddMemberToList "G02"
      Hs.AddMemberToList "G17"
      Hs.AddMemberToList "I01"
      Hs.AddMemberToList "I10"
      Hs.AddMemberToList "L01"
      Hs.AddMemberToList "M01"
      Hs.AddMemberToList "S11"
      Hs.AddMemberToList "S12"
      Hs.AddMemberToList "S13"
      Hs.AddMemberToList "S15"
      Hs.AddMemberToList "S32"
      Hs.AddMemberToList "V01"
      Hs.AddMemberToList "Y01"
      End if
      End If
      End if
      Next
      End if
      End if
      End If

       

       

      Could you please tell me where I'm wrong? why this Dynamic POV memberlist doesn't work on the columns of a data form?

       

      Thank you a lot.

        • 1. Re: Dynamic POV memberlist ICP for Data entry form
          user6692921

          I have no idea what you're trying to do - it's very confusing. The EntPOV variable is only used to generate a list of descendant nodes. But then the comparison against GRP.A01 is for an item in the node list not the current Entity (EntPOV). Explain what you are trying to do in English rather than code and someone might be able to point you in the right direction.

          • 2. Re: Dynamic POV memberlist ICP for Data entry form
            2937340

            Hi,

             

            thanks for your answer.

             

            I try to explain better:

            If i select the entity A01 from the data form, i would like to see only 20 ICPs, if i select another entity i sholud see just 3 ICPs..etc etc

             

            I just want to create an ICP dynamic (@POV) list starting from a selected entity.

            The ICP list should change in case I select a different entity.Every entity could see only "n" ICP, not all.

             

            Is it possible?

             

            Thanks.

            • 3. Re: Dynamic POV memberlist ICP for Data entry form
              user6692921

              Yes you can do that. How do you identify what ICP members you want to see for each Entity? From your sample code above you are simply hard-coding a list. Can this be derived from the hierarchy or by using the UD fields? Otherwise you have a lot of maintenance on the hard-coded lists.

              • 4. Re: Dynamic POV memberlist ICP for Data entry form
                2937340

                Thanks, the ICP list for each entity is different every time so i know I have to mantain manually the ICP list 

                 

                how could I make it work? because that code doesn't working on data form. i simply call the list of ICP (named ICP_Attive) from the data form but it appears an undefined error when i click to view the modified data form.

                 

                Regards

                • 5. Re: Dynamic POV memberlist ICP for Data entry form
                  user6692921

                  As a starting point you could try this. (I'm not sure if the ICP dimension needs to use HS.AddEntityToList):

                   

                  EntPOV=HS.MemberListEntity

                   

                  If HS.MemberListID = 1 Then                    

                      If EntPOV = "A01"  then

                          Hs.AddMemberToList "AAA"

                          Hs.AddMemberToList "AAB"

                          Hs.AddMemberToList "AE1"

                          Hs.AddMemberToList "E49"

                          Hs.AddMemberToList "FE1"

                          Hs.AddMemberToList "FE2"

                          Hs.AddMemberToList "FE3"

                          Hs.AddMemberToList "G02"

                          Hs.AddMemberToList "G17"

                          Hs.AddMemberToList "I01"

                          Hs.AddMemberToList "I10"

                          Hs.AddMemberToList "L01"

                          Hs.AddMemberToList "M01"

                          Hs.AddMemberToList "S11"

                          Hs.AddMemberToList "S12"

                          Hs.AddMemberToList "S13"

                          Hs.AddMemberToList "S15"

                          Hs.AddMemberToList "S32"

                          Hs.AddMemberToList "V01"

                          Hs.AddMemberToList "Y01"

                      End if

                  End If