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

Trying to write script in pdf - first time

Community Beginner ,
Feb 23, 2024 Feb 23, 2024

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.

TOPICS
How to , JavaScript , PDF
227
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 ,
Feb 23, 2024 Feb 23, 2024
LATEST

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 : "";

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