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

Javascript for PDF form calculation

New Here ,
Jan 17, 2019 Jan 17, 2019

Hi, I'm new to PDF forms and need to insert a calculation into a form.  I've mastered the basic calculations, but need a custom calculation for this one.  Can any one help me with it?  Here's the formula from excel:

=50+((10*SUM(A1:A10))/(SQRT(0.7*SUMSQ(B1:B10)+0.3*(POWER(SUM(B1:B10),2)))))

Any help greatly appreciated.

John

TOPICS
PDF forms
6.5K
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 ,
Jan 17, 2019 Jan 17, 2019
LATEST

There's no one-to-one conversion from Excel to Acrobat JS.

Some functions (like SQRT) do have a direct JS equivalent (Math.sqrt), others (like SUM) don't and you'll need to write your own code to achieve the same result.


See:

JavaScript Math Reference

https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations

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