Copy link to clipboard
Copied
I need to calculate the following in FieldC calculation.
IF FIELDA is greater than FIELDB then FIELDB value goes into FIELDC.
Can anyone help me do this??
you're help would be greatly appreciated.
Copy link to clipboard
Copied
Hi,
You would need to use something like :
var FIELDA = this.getField ("FIELDA").value;
var FIELDB = this.getField("FIELDB").value;
if ( FIELDA > FIELDB) {
this.getField("FIELDC").value = FIELDB;
}
This is just a quick example.
Regards
Malcolm
Copy link to clipboard
Copied
Thank you for helping me out but I guess I didn't add that if FieldA is less than or equal to FieldB then the value in FieldC should be the value of FieldA.
Could you help me with that.
And, would you know how to validate a field so that if the amount input is greater than another specified field it would show an error and not allow the input.
Copy link to clipboard
Copied
What about if it's not, though?