Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Validate script needed

Avatar

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

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

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