Answered
Hi,
I have a budget form with a row of 5 number ($) text fields. The 5th field's value can't exceed the total of the four fields before it. if it does i want it to return an error msg and reset the value of the field to 0.
So i figured this script needs to be in "Run a custom validation script" of field name "cashe_e" and it would be something like this:
var a = this.getField("cash_a");
var b = this.getField("cash_b");
var c = this.getField("cash_c");
var d = this.getField("cash_d");
var e = this.getField("cash_e");
if (e > (a+b+c+d)) {
app.alert("The request cannot be more than the total cash expended amount in this category for the current event");
}
Please help!!
Thank You!
The custom validation code for the "e" field might look something like:
This code assumes the fields have a format category of Number.
George