Skip to main content
Participant
January 22, 2016
Question

Simple IF Statement

  • January 22, 2016
  • 1 reply
  • 314 views

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

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
January 23, 2016

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

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

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