4 Replies Latest reply on Jan 24, 2013 12:16 PM by dan-pavlik

    I'm JS illiterate, need help getting an Acrobat form to work like the Excel file I made it from.

    dan-pavlik

      Hi folks.

       

      I am tasked to put together a purchase order request form and it has to be in PDF format.

       

      I originally built it in Excel, and after a day and a half of googling, I finally came upon the formula(s) that make 2 of columns interact the way I want them to.

       

      Column A ("Line Item Number") triggers its corresponding cell in Column C ("Obligate/Deobligate") in the following way:

      • If the A cell is blank, its corresponding C cell diplays "O/D"
      • If the A cell has a number entered into it which is the same as any cell above it, the corresponding C cell displays "Deobligate"
      • If the A cell has a number entered into it which is different than every cell above it, the corresponding C cell displays "Obligate"

       

      The formula I used, starting in the second C cell is:

       

               

      =IF(A2="","O/D",IF(COUNTIF(A1:A1,A2),"Deobligate","Obligate"))

       

      And it changes down the column ending at the 23rd C cell with:

       

      =IF(A23="","O/D",IF(COUNTIF(A1:A22,A23),"Deobligate","Obligate"))

       

       

      Will this even translate into Javascript?  And if it does, I assume that I would paste the script into the "Calculate" portion of the form field properties, is this correct?

       

      Also, (I realize I'm asking a lot), if the correct code is fast and easy for someone here to whip up, I would appreciate it, since as I said before, I really don't know the first thing about JS, or coding in general.

       

      Thanks in advance.