Skip to main content
Known Participant
October 15, 2020
Answered

MULTIPLE FIELD CALCULATIONS

  • October 15, 2020
  • 1 reply
  • 738 views

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 has been closed for replies.
Correct answer Nesa Nurani

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;

1 reply

Inspiring
October 15, 2020

So you just want field1*field2*field3?

Paul5D64Author
Known Participant
October 16, 2020

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

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
October 16, 2020

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;