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

Trying to write script in pdf - first time

Community Beginner ,
Feb 23, 2024 Feb 23, 2024

Copy link to clipboard

Copied

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

Views

71

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 ,
Feb 23, 2024 Feb 23, 2024

Copy link to clipboard

Copied

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

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