Skip to main content
Participant
February 23, 2024
Question

Trying to write script in pdf - first time

  • February 23, 2024
  • 1 reply
  • 295 views

Good afternoon,

 

I am trying to create a calculation script that when a number is exceeded in one cell, the number will be muliplied by a percentage and appear in another cell. For example if our total cash cell exceeds $20,000, the total will be multiplied by .40% and the total will appear in another cell. I would really appreciate any assistance from experts.

Thank you.

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
February 23, 2024

Use something like this as custom calculation script of a field where you want to show result:

var total = Number(this.getField("Total").valueAsString);
event.value = total > 20000 ? total*.40 : "";