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

Fillable form with math formula not working

Explorer ,
Nov 02, 2023 Nov 02, 2023

Hello all,

 

I am trying to add a math formula to a Fillable pdf and I am running into some issues. I have taken a formula from excel and need it to work inside of this pdf with no luck. I've got this portion of the formula to work: G29*((G30-G28)/(G30-G31)) I need this equation taken to the power of 0.54. Is there anyone who can help me with this?

TOPICS
PDF , PDF forms
6.6K
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
3 ACCEPTED SOLUTIONS
Community Expert ,
Nov 02, 2023 Nov 02, 2023

OK, then you must switch to using a script, such as this one (note you must also take into account the situation where G30 equals G31, to avoid division by zero):

 

 

var G28 = Number(this.getField("G28").valueAsString);
var G29 = Number(this.getField("G29").valueAsString);
var G30 = Number(this.getField("G30").valueAsString);
var G31 = Number(this.getField("G31").valueAsString);

var v1 = (G30-G31);
if (v1==0) event.value = "";
else {
	var v2 = (G30-G28);
	var v3 = G29*(v2/v1);
	event.value = Math.pow(v3, 0.54);
}

 

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
Community Expert ,
Nov 02, 2023 Nov 02, 2023

Ah, OK, that makes more sense... Then change these two lines:

var v3 = G29*(v2/v1);
event.value = Math.pow(v3, 0.54);

To:

var v3 = (v2/v1);
event.value = G29*Math.pow(v3, 0.54);

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
Community Beginner ,
Oct 31, 2025 Oct 31, 2025
LATEST

I installed Adobe Acrobat Reader on another computer, opened my form, and you are correct, the math formulas do work with that product.  Thanks!!

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
Community Beginner ,
Oct 30, 2025 Oct 30, 2025

With the document open in PDF Reader, and I click PDF Reader and About PDF Reader I get this:

Craig233868948lqt_0-1761861593900.png

 

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 30, 2025 Oct 30, 2025

That's not Adobe Acrobat Reader...

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 Beginner ,
Oct 30, 2025 Oct 30, 2025

Oh, OK.  However, I tried to download it and install and it said it found a newer version (Acrobat Pro) so it wouldn't let me install the reader.    

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 Beginner ,
Oct 31, 2025 Oct 31, 2025
LATEST

I installed Adobe Acrobat Reader on another computer, opened my form, and you are correct, the math formulas do work with that product.  Thanks!!

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