Skip to main content
Known Participant
Oct 15, 2020 11:48 AM UTC
Answered

MULTIPLE FIELD CALCULATIONS

Hi, Sorry to be asking again but I need some more help. 

I am trying to set up a PDF form in Acrobat 2017 to calculate the total of some cells. i.e    Field1 is CITY_RATE,  Field2 is COUNTRY_RATE, Field3 is NUMBER_DAYS and Field4 is TOTAL$ 

So if there is an entry in Field1 it is multiplied by Field3.  Using the calculate tab in properties I have been able to do this using "CITY_BFAST$, NUMBER_DAYS which does work.  But I want to set it up so that if I enter details in both Field1 & 2 they will both multiply by Field3 to give me a total in Field4 and this is where I am stumped.

Any assistance would be very much appreciated.

This topic is closed to new replies. Start a new post to keep the conversation going.
Nesa Nurani
Nesa NuraniCorrect answer
Community Expert
Oct 16, 2020 12:58 PM UTC

Try this in field4 as custom calculation script:

var f1 = this.getField("Field1").value;
var f2 = this.getField("Field2").value;
var f3 = this.getField("Field3").value;
event.value = f1*f2+f2*f3;

4 replies

Inspiring
Oct 15, 2020 12:22 PM UTC

So you just want field1*field2*field3?

Translate
Paul5D64Author
Known Participant
Oct 16, 2020 11:58 AM UTC

Hi Asim123.  Unfortunately, field1*field2*field3 won't work.

I need something like:

Field1 * Field 3 + Field 2* Field3 with both results summed in Field 4 but i can't figure out how to make that happen

Translate
Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
Oct 16, 2020 12:58 PM UTC

Try this in field4 as custom calculation script:

var f1 = this.getField("Field1").value;
var f2 = this.getField("Field2").value;
var f3 = this.getField("Field3").value;
event.value = f1*f2+f2*f3;

Translate