2 Replies Latest reply on Dec 2, 2015 5:41 AM by kadel27

    Error: arithmetic over/underflow - Divided by zero?

    kadel27

      Hello,

       

      Im newbie on Adobe LiveCycle. Ive successfully create a form and now I wanted to put some calculating on it.

      Everything is fine, pdf is calculating, but Im getting an errors, because I understand that Im trying to calculate with the filed, those are empty - not inputed yet as a zero fields => divide by zero... ?

       

      May somebody please help me, how to write the formula to not get the errors?

       

      My actual formula is:

      pod11.rawValue = ( ( ( pod2.rawValue * ( pod8.rawValue / 100 ) ) - pod6.rawValue ) / pod2.rawValue ) * 100

       

       

      Thank You very much for the help!

      K.

        • 1. Re: Error: arithmetic over/underflow - Divided by zero?
          Magus069 Level 4

          Hi there,

           

          to prevent errors within calculate you should verify each fields to make sure there is no rawValue that is equal to null..

           

          if you are using formcalc, use "<>" or "ne" to specify not equal to

          if you are using javascript, use "!=" or "!==" to specify not equal to

           

          JavaScript

          if (pod2.rawValue != null && pod8.rawValue != null && pod6.rawValue != null){

                 pod11.rawValue = ( ( ( pod2.rawValue * ( pod8.rawValue / 100 ) ) - pod6.rawValue ) / pod2.rawValue ) * 100;

          } else{

                 pod11.rawValue = null;

          }

           

           

          FormCalc

          if (pod2.rawValue <> null & pod8.rawValue <> null & pod6.rawValue <> null) then

                 pod11.rawValue = ( ( ( pod2.rawValue * ( pod8.rawValue / 100 ) ) - pod6.rawValue ) / pod2.rawValue ) * 100

          else

                 pod11.rawValue = null

          endif

           

          Hope this will help!

          • 2. Re: Error: arithmetic over/underflow - Divided by zero?
            kadel27 Level 1

            THANKY YOU VERY MUCH!!!!

            You made my day! :)