6 Replies Latest reply: May 24, 2013 3:05 PM by 643dp RSS

    Rule Help

      I need help with a rule that compares two C1 hierarchies and runs a calc. if a base member is not in both. Or in other words, if hierarchy 1 has base members A, B and C and hierarchy 2 has base members A and B then I want to execute a calculation on only member C. I can get this to work using a User Defined attribute, but I'm thinking there must be another way. Thanks for any suggestions.
        • 1. Re: Rule Help
          I would suggest structuring something using HS.Custom1.IsBase. See below:

          If HS.Custom1.IsBase("CUSTOMPARENT1","") = TRUE Then
          If HS.Custom1.IsBase("CUSTOMPARENT2","") = FALSE Then
          End If
          End If

          This only compares in one direction Parent1 -> Parent2, but should be enough to get you pointed in the right direction... You could consider setting up a common parent custom member for these two hierarchies to simplify the filtering of the members.

          For example:


          +'First determine if the member is part of the rollup of the two hierarchies for comparison+
          If HS.Custom1.IsBase("CUSTOMPARENT_TOP","") = TRUE Then
          +'Next, see if the member does not exist in one of the hierarchies+
          If HS.Custom1.IsBase("CUSTOMPARENT1","") = FALSE or HS.Custom1.IsBase("CUSTOMPARENT2","") = FALSE Then
          +'Close out your IF statements+
          End If
          End If

          For more details on this function, use http://docs.oracle.com/cd/E17236_01/epm.1112/hfm_admin.pdf, pages 279-281. As a note, the second set of empty quotes in the function dynamically checks the current member.

          Hope that helps,

          Edited by: SDuplaga on May 22, 2013 11:30 AM
          • 2. Re: Rule Help
            Scott, I tried the first suggestion and it fails right away on the first line. With error "Error in function ISBASE"
            • 3. Re: Rule Help
              Please post the content of the rule for review.
              • 4. Re: Rule Help
                I tried:

                If HS.Custom1.IsBase("BUSINESSLINE","") = TRUE Then
                If HS.Custom1.IsBase("OTH_BUSINESSLINE","") = FALSE Then
                HS.Clear "A#NETREV"     
                End If
                End If

                I even tried:

                If HS.Custom1.IsBase("","") Then
                     HS.Clear "A#NETREV"     
                End If

                Both times I just force calculated on a single base entity.
                • 5. Re: Rule Help
                  Try this:

                  For Each sC1 In HS.Custom1.List("BUSINESSLINE","[Base]")
                  If HS.Custom1.IsBase("OTH_BUSINESSLINE",sC1) = FALSE Then
                  HS.Clear "A#NETREV.C1#" & sC1
                  End If
                  • 6. Re: Rule Help
                    Brian, That worked. Thanks.