Display message based on value entered in text field

Avatar

Avatar

r00s74a

Avatar

r00s74a

r00s74a

12-02-2015

I feel like this is a simple task, for someone that knows what they are doing.  I have a text field in LiveCycle that the user is entering a numerical value in.  When the field is exited, I would like a message to be displayed after calculating the value entered.  For example, the message will be displayed only when a value of 40 or greater is entered.   I assume that basically it should be something along the lines of IF field.rawValue > 40, THEN  display message "you must enter justification" 

Can someone provide me with the exact syntax that should be used?  Thanks for your assistance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372
_Bruce_Robertson
MVP

12-02-2015

Try this JavaScript in the exit event of you field

 

if (this.rawValue > 40)

{

    app.alert({cMsg: "You must enter justification", cTitle: "Warning", nIcon: 1});

}

 

Regards

Bruce