Copy link to clipboard
Copied
I am working on a pdf form in adobe acrobat that will merge with another program (Service Monster). This is accomplished by adding data tags such as [LINE_QTY_3] into the properties name box of a given text form field in acrobat, which then pulls in the quantity from line 3 of the other program. The problem I am having is I want to add together the value from 2 text fields that contain data that was pulled in through these data tags. In particular, I want to sum [LINE_QTY_3] & [LINE_QTY_4]. Any ideas on how to accomplish this?
Copy link to clipboard
Copied
Your question is not clear. PDF have many types of text objects and tags.
Are asking about form fields or accessibility tags?
Acrobat JavaScript can only access form fields.
Copy link to clipboard
Copied
Form fields...
Copy link to clipboard
Copied
Use the built-in Sum function under the Calculate tab of the field where you want to show the result and select those two fields from the list.
Copy link to clipboard
Copied
I tried that, but it won't let me select any of the boxes next to the fields, I can only select all.
Copy link to clipboard
Copied
Use the space-bar or click a bit off to the center of each check-box.
Copy link to clipboard
Copied
highlighting and hitting the space bar worked for selecting. Which is a bit of progress. Now I get a $0.00 instead of a blank field. But it's still not adding the values from the 2 form fields. Is there a way to make it so it doesn't sum the fields until after the fields populate the data that it gets through the data tags? Like have the pdf fill form fields in a certain order?
Or any other ideas?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I tried entering the following into the text field properties->Calculate->Custom Calculation Script:
event.value = ( this.getField("[LINE_QTY_3]").value + this.getField("[LINE_QTY_4]").value )
It doesn't work. Do to values of each field need to be converted into numbers before they can be added?
Copy link to clipboard
Copied
That's a good idea, yes.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now