0 Replies Latest reply on Nov 29, 2012 12:01 PM by 944157

    Rules - Parent entity not rolling up from base calcs

      What's the problem: Parent Entity member is calculating with a number for a certain account, even though I've specifically excluded this from happening in my rule. I don't want the parent entity to calculate
      What should happen: Parent Entity member should just add up the result of its children for that account

      Hi guys,

      I have a calculation that is designed to specifically run at base entity level only. So I'm expecting that the parent result for a certain account should just be the addition of the results in its child entity members for that account

      You can see from the code snippet below that I'm running the statements only when they're enclosed by the vIsBaseEntity conditional statement.

      I want to get the required number, a simple A-B calc which looks at the change from prior year (but flips the sign if it's an equity account) into the SBS_MOVE custom 1 member.

      If vIsBaseEntity then
           For Each vBSMoveAcct in HS.Account.List("","CalcBSMovementAccounts")
                If HS.Account.UD2(vBSMoveAcct) = "Equity" Then

           HS.Exp "A#" & vBSMoveAcct & ".C1#SBS_MOVE." & All_NONES_XC1C2C4 & " = A#" & vBSMoveAcct & "." & ALL_TOPS_XC2C4 & " - A#" & vBSMoveAcct & ".Y#Prior.P#Last." & ALL_TOPS_XC2C4

                'Standard Calculation
                'C1#SBS_MOVE = Prior Year End Amount - Current Period Balance Sheet Amount
                HS.Exp "A#" & vBSMoveAcct & ".C1#SBS_MOVE." & All_NONES_XC1C2C4 & " = A#" & vBSMoveAcct & ".Y#Prior.P#Last." & ALL_TOPS_XC2C4 & " - A#" & vBSMoveAcct &"." & ALL_TOPS_XC2C4
                End If
      end if     

      However what actually happens is that whilst the base entities do calc, as specified in the rule, the parent entity does as well for a few accounts, even though that's not specified anywhere in my rule (or in my rules file anywhere else)

      The parent entity for a certain account (Pl reserves), instead of giving me the result of (Current Year YTD minus Prior Year YTD), just gives me the result of Current Yr YTD, or just the A part of the A-B.

      The above code is the only place where SBS_MOVE calculates.

      I've tried to use a HS.Clear to clear that parent intersection first but to no avail.

      So the intersection doesn't have any erroneous data left in it, it actively calculates a result for that parent member when I've specifically told it not to! Why???

      Please help!