11 Replies Latest reply on Nov 8, 2016 8:39 AM by Aman Habib

    Javascript Adobe Acrobat Help

    Aman Habib

      Im looking for some help with javascript in my PDF.

       

      I have multiple fields calculating other fields and I've come to a dead end. Usually the fields I'm working with are directly related to another field. I'll try to simplify the calculations to make things easier.

       

      ex.

       

      In Field "Text2", I could have a calculation,

       

      ("Text1" / 24)

       

      In Text3, the calculation would be,

       

      let var A = "Text1", let B = "Text2"

      Var result= "A" - "B"

       

      In Text4, I had a code to populate a number based on the number "Text3" shows. If i falls within a certain range, a number will show up.

       

      If var is >0 and <=90 then "1 hour"

      if  var is >90 and <=180 then "1:30 hour"

       

      etc.

       

      In Text 5, there is another calculation that is not related with any other fields shown above.

       

       

       

      My problem now is that in Text5, sometimes a certain number populates which will then change "Text4". Usually Text 5 has nothing to do with Text4 but here it does.

       

      How can i have an if statement within Text4 for those random occasions where specific numbers in Text 5 populate?

       

      My problem is that there are already calculations that are incorporated with Text4 using numbers from other fields.

       

      I really hope this made sense.

       

      Any help would be greatly appreciated. Thanks in advance