1 Reply Latest reply on Aug 27, 2010 4:51 AM by pguerett

    re: calculating max rebates in Livecycle

    fio_09

      Hi,

       

      I am working on a form where I have to calculate two tax rebate values.Using the script below, I have the first half of it working fine. I need the second half to calculate the rebate amount up to a maximum amount of $26250.00. Not sure what to do and have not had much luck with what I have tried so far. Any ideas would be greatly appreciated.

       

      if (checkBox.rawValue == 1 && PRICE_OF_UNIT.rawValue > 525000)
      {
          this.rawValue = 26250;
      }
      else if (checkBox.rawValue == 1 && PRICE_OF_UNIT.rawValue <= 525000)
      {
          this.rawValue = PRICE_OF_UNIT.rawValue *0.07*0.7143;
      }
      else
      {
          this.rawValue = 0;
      }

       

      Thanks,

      fio_09

        • 1. Re: re: calculating max rebates in Livecycle
          pguerett Level 6

          Are you getting any errors in the Javascript console (Ctrl-J in Acrobat). Can you validate that you are at least getting into the right part of the code? Put a message box in the second part to validate that your condition is at least being met.

           

          When building compound statements I like to wrap each part in brackets to ensure that it is getting evaluated correctly.

           

          if ((A == 1) && (B <= 2)) {

               ....

           

           

          Lets start there and see what happens.

           

          Paul