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

Simple IF Statement

New Here ,
Jan 22, 2016 Jan 22, 2016

I have a field called "NetCash".  If this value of "NetCash" is less than 0, then in another field called "Available" I need to return the value 0.

If the value in the "NetCash" field is greater than 0, then I need to return the actual value of the "NetCash" field in my "Available" field.

Please can you help me?

Many thanks

TOPICS
Acrobat SDK and JavaScript , Windows
285
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 ,
Jan 23, 2016 Jan 23, 2016
LATEST

Use this code as the custom calculation script of  "Available":

var netCash = Number(this.getField("NetCash").value);

event.value = Math.max(0, netCash);

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