3 Replies Latest reply on Oct 10, 2013 9:05 PM by Hyp201207

    Need help with writing a rule

    Dakku

      Need help with some rules. I want to book a number to a specific Entity at a Specific Custom 4 only. I don't want this formula to work at all C4 levels. How can this be done?

       

      for example if Entity is "XBM1123" and we use C4 for tracking and the tracking level I want to book it to is IMPORT, how can this be done for a specific account 4400221

       

      I have my formula as

       

      If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then

      If HS.Entity.Member = "XBM1123" or HS.Custom4.Member = "IMPORT" then

      HS.EXP "A#4400221= A#4521111 + A#3526644 + A#635210"

      End If

      End if

       

      this did not work. I got hte following error

      Calculate started.<BR>Error executing VBScript Microsoft VBScript runtime

      error, Line 259:Object doesn't support this property or method:

      'HS.Custom4.Member'.<BR>Calculate finished.<BR>Error executing

      VBScript %0.

       

       

      I then changed it to the below and it still did not work

       

      If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then

      If HS.Entity.Member = "XBM1123" then

      HS.EXP "A#4400221.C4#IMPORT= A#4521111 + A#3526644 + A#635210"

      End If

      End if

       

      error

        • 1. Re: Need help with writing a rule
          MFU

          You are close.

          Try:

           

          If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then

              If HS.Entity.Member = "XBM1123" then

                 HS.EXP "A#4400221.C4#IMPORT= A#4521111.C4#IMPORT + A#3526644.C4#IMPORT + A#635210.C4#IMPORT"

              End If

          End if

           

          or replace IMPORT with with Top_C4 or what ever member you need to copy to C4#IMPORT.

           

          Rule of thumb, to be on the safe side and for most simple calcs, is if you mention a dimension on the left side, you need to define it on the right side as well.

          1 person found this helpful
          • 2. Re: Need help with writing a rule
            Dakku

            thank you. wil try it today. Appreciate the assistance

            • 3. Re: Need help with writing a rule
              Hyp201207

              I agree with MFU but that is a very hard coded rule, not knowing the business requirements behind it, i could only suggest using variables that are very clearly distinguishable. In the event the business changes.