Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Fillable pdf form - calculations between fields

New Here ,
Mar 21, 2017 Mar 21, 2017

I am using Adobe Acrobat Pro DC.   I am creating a pdf fillable form, which contains fields for areal space measurements.   I would like to multiply two fields (variable values), divide the result by a set value number and have that result displayed in a separate field to reflect number of acres in the area.  For example:   length X width / 43,560 = #Acres

Can anyone advise please as to what script/formula to use for this fillable adobe form?

TOPICS
PDF forms
33.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Mar 22, 2017 Mar 22, 2017

Let's say the fields are called "Length", "Width" and "Acres".

Under the Calculate tab of Acres select the second option "Simplified field notation", and then enter this formula:

Length * Width / 43560

That's all there is to it...

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 27, 2017 Sep 27, 2017

Thank you! That fixed it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2020 Feb 19, 2020

Good afternoon, I am new to this so giving this a try. I am creating a score card and need some assistance on adding some numbers and then diving the total by a set number ranging from 1 to 3. I have attached a photo of what I am referring to. I can add the numbers but having trouble with the division part of it. In summary, it needs to be total score divided by total number of trades (1-3) as noted for an average score. Any help would be much appreciated. 

Scorecard.pngexpand image

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2020 Feb 19, 2020

Please start a new thread

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 03, 2022 Feb 03, 2022

I'm trying to subtract one field from the other. In Simplified field notation of the answer field, I'm entering:

1st field-2nd field.

 

I tried including an = before the 1st field. I tried adding = the destination field after the 2nd field. 

 

Nothing seems to work.

 

Help is greatly appreciated!

 

Thank you much.

Anthony

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2022 Feb 03, 2022

For Simplified Field Notation the field names must not contain spaces or punctuation. Which means you need to change both the field names and the SFN script. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2023 Oct 17, 2023

What if I want to have a date entered on a form and then have the next field calculate 15 calendar days and have that date listed. For example, the date a form is submitted to me starts a 15 day waiting period that I need to know the date of.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2023 Oct 18, 2023

Dates are handled differently than numbers. They are more complictated.  You'll find lots of scripts for adding days to a date on this forum. It's a common question.

 

Here's an example validation script for the field where the date is entered. 

 

var dtStart =  util.scand("mm/dd/yyyy", event.value);
if(dtStart)
{
      dtStart.setDate(dtStart.getDate() + 15);
      this.getField("NextField").value = util.printd("mm/dd/yyyy", dtStart);
}

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 18, 2023 Oct 18, 2023
LATEST

Thank you, Thom. That was extremely helpful and worked like a charm.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines