5 Replies Latest reply on Jun 17, 2014 5:10 PM by MatLac

    I need a custom calculation script that takes the target field name and extrapolates the names of the other fields from it, and then uses their values in the calculation.


      Here is what I am trying to accomplish:


      I have a long Excel price list that I converted to pdf and turned into a fillable pdf order form.  Each row provides information for 1 product and allows the customer to enter an order qty. At the end of each row is a calculation field that calculates the product of the price x qty. 

      SO, for example I have fields such as this:   Price1     Qty1      Total1     and the calculation is set as:  Calculation is the product of Price1, Qty1


      I have taken those fields and, using the command "Place Multiple Fields", have populated each row of the pdf with additional fields.


      Now I have the following fields:


      In row 1:   Price1.0.0    Qty1.0.0      Total1.0.0

      In row 2:   Price1.0.1     Qty1.0.1     Total1.0.1

      In row 3:   Price1.0.3     Qty1.0.3      Total1.0.3, etc.


      The only thing is that the calculation in these new total fields have the same information:    Calculation is the product of Price1, Qty1.

      I need each row to have a different calculation (eg For Total1.0.1:  Calculation is the product of Price 1.0.1, Qty1.0.1, etc.)


      Is there javascript code that would update the calculations for me so that if I use the command "Place Multiple Fields" - each of the new Total fields would contain update calculations?


      I hope this makes sense.  All help is appreciated.  Thank you