Highlighted

Need Javascript Formulate for Adobe Acrobat Calculation Field

Community Beginner ,
Aug 07, 2020

Copy link to clipboard

Copied

I am working on a fillable form for a cemetery.  If you look at the attachment the two fields on the right are usually calculated with tax which I create a formula for to register in the Sales Tax box.  However, after I completed the form the cemetery owner informed me that some items in those two categories are not taxable but she was unable to override the calculated amount.

The existing formula is    (Amount3+Amount4)*.06  which is displated in Amount7    I was thinking that I could change block 7 (which is to the left of Sales Tax) to a drop down with Yes or No.  But then I need a formula that would look to block 7 and if it is checked No then it would register as $0.00 in the Amount7 (Sales Tax) field, otherwise it would report the 6% sales tax.
Thank for any help.

If this is what you had in mind add this code to Amount7 field "Custom Calculation Script"

 

 

var a = this.getField("Amount3").value;
var b = this.getField("Amount4").value;
var c = this.getField("Dropdown").value;
if(c == "No"){event.value = "$0.00";
}else event.value = (a+b)*.06;

Views

58

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

Need Javascript Formulate for Adobe Acrobat Calculation Field

Community Beginner ,
Aug 07, 2020

Copy link to clipboard

Copied

I am working on a fillable form for a cemetery.  If you look at the attachment the two fields on the right are usually calculated with tax which I create a formula for to register in the Sales Tax box.  However, after I completed the form the cemetery owner informed me that some items in those two categories are not taxable but she was unable to override the calculated amount.

The existing formula is    (Amount3+Amount4)*.06  which is displated in Amount7    I was thinking that I could change block 7 (which is to the left of Sales Tax) to a drop down with Yes or No.  But then I need a formula that would look to block 7 and if it is checked No then it would register as $0.00 in the Amount7 (Sales Tax) field, otherwise it would report the 6% sales tax.
Thank for any help.

If this is what you had in mind add this code to Amount7 field "Custom Calculation Script"

 

 

var a = this.getField("Amount3").value;
var b = this.getField("Amount4").value;
var c = this.getField("Dropdown").value;
if(c == "No"){event.value = "$0.00";
}else event.value = (a+b)*.06;

Views

59

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
Aug 07, 2020 0
Engaged ,
Aug 07, 2020

Copy link to clipboard

Copied

If this is what you had in mind add this code to Amount7 field "Custom Calculation Script"

 

 

var a = this.getField("Amount3").value;
var b = this.getField("Amount4").value;
var c = this.getField("Dropdown").value;
if(c == "No"){event.value = "$0.00";
}else event.value = (a+b)*.06;

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
Reply
Loading...
Aug 07, 2020 0
try67 LATEST
Most Valuable Participant ,
Aug 07, 2020

Copy link to clipboard

Copied

A small note: It's better not to include the currency symbol when applying the value. Just use 0 or even "0", and let the Format setting of the field add the currency symbol. Otherwise you won't be able to set it up as a Number field and use it in other calculations.

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
Reply
Loading...
Aug 07, 2020 0