6 Replies Latest reply on Jun 7, 2013 2:11 PM by Mary_Fit

    Display of contribution to an entity in a data form

    Mary_Fit
      Hi guys

      I'm stuck with a data form which should show base entities contribution to another entity. And they have intermediate entities between like here:

      A
      __B
      ____1
      ____2
      __C
      ____3
      ____4

      So users select elements like A in the Selectable POV and they suppose to see nodes like B.1, B.2, C.3, C.4 in columns. I've written it in a such way in columns:
      C1=E{{{@Cur.[Base]}.[Parent]}.[Base]}. But the table generator says syntax is wrong. Is there a way to show all contributing entitities by choosing their parent for the level hier than a node parent?
        • 1. Re: Display of contribution to an entity in a data form
          KostasN.
          Hi Mary,
          Contribution values work on Nodes which are defined as parent.entity pairs. Therefore, there is no way to directly access the contribution of an entity to an ancestor other than the direct parent.

          However, in some special cases you can achieve this in a very limited way, for a clearly set of non-intercompany accounts. What you can do for these special accounts, is to define them as intercompany, without setting up a plug account (you don't want to do elimination on them) and setting up NoInput rules at base level so that only [ICP None] is allowed for input. Then, for these accounts you write in the consolidation rules:
          If vICP = "[ICP None]" Then
          HS.Con("I#" & HS.Entity.Member , vPCon, "")
          Else
          HS.Con("" , vPCon, "")
          End If
          so that during proportionalization your numbers will be redirected from [ICP None] (the input) to the ICP member that represents your contributing entity. The "if" statement prevents this code to do the same during consolidating parent entities.

          Then at the top Entity level you may select the ICP member of the accounts you have applied the technique to see what the specific entity has contributed to the top. This guarantees correct numbers especially if the percentage used in HS.Con is not always 100%, which means that the value at entity B with ICP = 1will not be the same as the value at entity A with ICP = 1.

          Regards,
          --Kostas                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
          • 2. Re: Display of contribution to an entity in a data form
            Mary_Fit
            Hi Kostas N,
            I'm not writing rules, I'm building a data form. Rules works fine, and I am to write audit tables to demonstrate base level nodes when choosing high level parent. For the moment I found such decision: E{@Cur.[Descendants]}. In the terms of my upper example this function gives such result: B.1, B.2, A.B, C.3, C.4, A.C. It displays all the base level nodes, but in addition it displays all intermediate too. (And my hierarchy is not as simple as in this example, so there are too much supperflous nodes). So I definitely need a fresh idea about it.

            Edited by: Mary_Fit on 05-Jun-2013 10:01
            • 3. Re: Display of contribution to an entity in a data form
              KostasN.
              Ok, it is your call, though it should be clear that contributions of B.1, B.2 add up to entity currency of B, contributions of C.3, C.4 to entity currency of C and contributions of A.B and A.C to entity currency of A, but contributions of B.1, B.2, C.3, C.4 will not necessarily add up to entity currency of A. Because I assume that your client does not expect only to bring the right columns on the form, but also he expects that numbers will also reconcile.

              --Kostas                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
              • 4. Re: Display of contribution to an entity in a data form
                Mary_Fit
                Hi Kostas N,
                Yes, you are right, I never thought of the fact, that audit will be strange because of different currencies. Though there are the same currencies, even ability of their difference obliges to show interim results, so base values could be trailed to total. I will use it as cons against initial appearance of the form.
                In addition I tried without success to make a list to display base nodes:
                     If HS.Dimension = "Entity" Then
                          If HS.MemberListID = 1 Then
                               ELi=HS.Entity.List("", "[Base]")
                               PLi=HS.Parent.List("", "[Descendants]")
                               For j=Lbound(PLi) to Ubound(PLi)
                               For i=Lbound(ELi) to Ubound(ELi)
                                    If HS.Entity.IsBase("", ELi(i)) And Not HS.Entity.IsBase("", PLi(j)) And HS.Entity.IsChild(PLi(j), ELi(i)) Then
                                         WriteTxt "Node: " & PLi(j) & "." & ELi(i)
                                         HS.AddEntityToList PLi(j), ELi(i)
                                    End If
                               Next
                               Next
                          End If
                     End If
                It writes to a file right nodes but don't add all of them to the form. (Really I use a certain element instead of "", so it's to show base level nodes of the fixed parent). But WriteTxt function displays right nodes then HS.AddEntityToList PLi(j), ELi(i) don't add them to the form.

                Edited by: Mary_Fit on 06-Jun-2013 03:27
                • 5. Re: Display of contribution to an entity in a data form
                  KostasN.
                  Dear Mary,
                  I copied this part of your code:
                  ELi=HS.Entity.List("", "[Base]")
                  PLi=HS.Parent.List("", "[Descendants]")
                  For j=Lbound(PLi) to Ubound(PLi)
                  For i=Lbound(ELi) to Ubound(ELi)
                  If HS.Entity.IsBase("", ELi(i)) And Not HS.Entity.IsBase("", PLi(j)) And HS.Entity.IsChild(PLi(j), ELi(i)) Then
                  WriteTxt "Node: " & PLi(j) & "." & ELi(i)
                  HS.AddEntityToList PLi(j), ELi(i)
                  End If
                  Next
                  Next
                  into my own member lists file in an application having three levels of Entities (like your example) and the only change I made to it was to call my own WriteTxt routine. I worked perfectly, I found the same members in the entity list as in my text file. Therefore, I cannot see a reason why it does not work for you.

                  --Kostas                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                  1 person found this helpful
                  • 6. Re: Display of contribution to an entity in a data form
                    Mary_Fit
                    Hurray :) It works for me too now! And I found more comfortable variant for me in addition. I wrote this list for Financial Reporting:
                              If HS.MemberListID = 1 Then
                                   ScenPOV=HS.MemberListScenario
                                   YearPOV=HS.MemberListYear
                                   PerPOV=HS.MemberListPeriod
                                   EntPOV=HS.MemberListEntity
                                   If ( EntPOV [is not equal sign should be here, it can't be pasted to the message] "" ) Then
                                        ELi=HS.Entity.List(EntPOV, "[Base]")
                                        PLi=HS.Parent.List(EntPOV, "[Descendants]")
                                        If IsArray(ELi) And IsArray(PLi) Then
                                             For each Par in PLi
                                             For each Ent in ELi
                                             If HS.Entity.IsBase(EntPOV, Ent) And Not HS.Entity.IsBase(EntPOV, Par) And HS.Entity.IsChild(Par, Ent) Then                          
                                                       HS.AddEntityToList Par, Ent
                                                  End If
                                             Next
                                             Next
                                        End If
                    End If

                    So, now I can see all the base level nodes in audit table for different high level parents.

                    Edited by: Mary_Fit on 07-Jun-2013 07:11