app.alert("This is not a valid option since you selected NJ as state",1,0,
thanks, appreciate the help. I'm getting the popup but it's triggering at the wrong time. The popup windows displays when "Income / Growth" is already selected and I select another value, but I want it to display when I select "Income / Growth". Here's my current code on the Validate tab. I also have "Commit Selected Value Immediately" selected.
var e = this.getField("SchB_InvObj")
(e.value == "Income / Growth")
app.alert("This is not a valid option since you selected NJ as state",1,0,"Warning!");
If this field is a combo-box or list-box, tick the option to commit the
selected value immediately.
thanks. It is a combo box and I already have that option ticked.
Instead of accessing the value by using getField(), use event.value .
The reason is that the value hasn't been committed yet to the field (you're
in the middle of validating it, after all), so the value you get from
getField() will be the previous value of the field.
got it, thanks for all the help. One more thing...
how do i programatically put focus back on that field ?
However, I would consider not using that. It can be quite annoying for users
to be "stuck" in a field.