Highlighted

Validate script needed

Avatar

Guest

14-01-2009

I have a numeric field which I like to validate in case the amount entered is higher than required.

We have 3 spending levels of authority: level 1(Limit $10,000) and level 2(Limit:$10,000-50,000) and level 3(Limit over $50,000).

For example if the amount into numeric field is a number higher than 10,000 and less or equal than 50,000 a message to show up to inform that

Level 2 Approval required.

Replies

Highlighted

pguerett

14-01-2009

I would add javascript code on the exit of the field that would do something like this:



if ((this.rawValue >= 10000) && (this.rawValue <= 15000)){

app.alert("This amount requires level 2 approval")

} else {

if (this.rawValue >= 15000){

app.alert("This amount requires level 3 approval")

}

}



this.rawValue will return the value that the user entered into the field