Hi,
It will be better if you will do the validation in the exit event of the Deposit field. So if the user enters a wrong value and exits the field it will prompt the user to enter the currect value.
so you can write the code in the exit event of the Deposit Field.
var Total = Totalfield.rawValue.
var Deposit = DepositField.rawValue.
if !(Deposit >= Total/5) // As 20%x = x/5
{
app.alert("Please enter a correct value" ); // Any message you want to display;
this.rawValue = null; // Just to make the field's value null or you can set the value to default 20% = Total/5
}
Thanks,
Bibhu.