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

Help with java script calculations in fillable form in DC

New Here ,
Aug 23, 2022 Aug 23, 2022

Copy link to clipboard

Copied

I'm trying to add a calculation in a fillable form for simple interest to make things easier on the end user. Below is my latest attempt to get this to work. It continues to give a syntax error. Where am I going wrong?

Interest Earned = ( this.getField("Ave Bal").value *0.001).value

TOPICS
JavaScript , PDF forms

Views

173

Translate

Translate

Report

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 ,
Aug 23, 2022 Aug 23, 2022

Copy link to clipboard

Copied

Is this supposed to be the calculation script for "Interest Earned"? If so, use this:

event.value = Number(this.getField("Ave Bal").value) * 0.001;

Votes

Translate

Translate

Report

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 ,
Aug 24, 2022 Aug 24, 2022

Copy link to clipboard

Copied

LATEST

Please read this simple guide on how to write calculation scripts.

 

https://www.pdfscripting.com/public/How-to-Write-a-Basic-PDF-Calculation-Script.cfm

 

 

 

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

Votes

Translate

Translate

Report

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