Copy link to clipboard
Copied
Hope I can explain this correctly and I hope I'm not having a dingy moment where I'm missing the most basic thing. I've done javascript mathematics in Adobe Acrobat many times and have never had an issue like this. I HAVE to be missing something!
I'm having multiplying issues with my simple notation in the fields I'm telling it to calculate. The simple notionans are: Quantity * Value, Quantity_1 * Value_1, and so on. Quantity and Value have multiple fields going down the column. Each field is named differently, Quantity, Quantity_1, Quantity_2, Value, Value_1, Value_2, etc.
What I'm wanting is for employee to input the Quantity and then value (this number is not fixed), but have the Value field multiply the inputted amount from the Quantity field and what they inputted into the Value Field. When I test it, the first line is perfect. When I jump to the next row to fill in, it's multiplying the Value field with the Quantity_1 field. Then when I input the Value_1 field it adds that amount to the Value field. Here is a screenshot of what it is doing when I input each field with a Quantity of 2 and Amount 6 along with a screenshot of my simple notation. Each line should be 12 in the Value Fields. I also tested a completely different multiplication using a different field to go into the Value fields and it did the same thing. Example....in my Value and Value_1 fields I changed the script to read text_1 * Quantity_1 and text * Quantity with the same results. I also tried Value is the Product X of the following fields….so dice.
Here are the fields and field notations of the first two so you can see I have the names correct:
Here are the screenshots of what the calculations are doing:
What am I missing? THANK YOU
Copy link to clipboard
Copied
Seems fine to me... 2*6 = 12
Copy link to clipboard
Copied
You can't use a field's own value in the calculation of its value. That results in circular logic...
Copy link to clipboard
Copied
That's what I was thinking and so I tested other fields and still having the issue. Here are the screenshots for that where I used different fields to multiply.
Copy link to clipboard
Copied
Seems fine to me... 2*6 = 12
Copy link to clipboard
Copied
Oops, my bad, I hadn't changed the first line to use service visit field...See I knew I needed to go back to bed. Thanks for helping!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now