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

32

Likes

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;

Likes

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

Likes

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