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

Hi, I'm a designer and not a developer and I need major help with some custom calculation script.

New Here ,
Feb 01, 2018 Feb 01, 2018

Copy link to clipboard

Copied

I basically need a formula involving two fields, let's name them Field1 and Field2.

So if Field1 is less than or equal to 2000 then Field2=150.

However, if Field1>2000 then Field2=Field1 multiplied by .075.

Any ideas what the script would look like??


Thank you!!

TOPICS
Acrobat SDK and JavaScript , Windows

Views

334

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 01, 2018 Feb 01, 2018

Copy link to clipboard

Copied

As the custom calculation script of Field2 enter this code:

var v1 = Number(this.getField("Field1").valueAsString);

if (v1<=200) event.value = 150;

else event.value = v1*0.075;

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
New Here ,
Feb 01, 2018 Feb 01, 2018

Copy link to clipboard

Copied

LATEST

thank you soo much this worked!!!!

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