Mike,
Break your rule up into 2 different rules.
1st rule: check value for validity and if invalid show message box.
check the box at the bottom to stop processing rules.
2nd rule: set to condition to always run and query data
so if 1st rule runs because of an invalid field, 2nd rule won't run.
if field IS valid in 1st rule then rule will be skipped and 2nd rule
will run.
hope that helps.
Brian Miller
> I want to prevent a query from running if a field is blank or contains an
> invalid value. In the Run Query button properties, I created a Rule that
[quoted text clipped - 10 lines]
> search criteria is invalid my error msg will display, but then InfoPath
> continues to run the query which I do not want.
mikeg - 08 Jun 2006 18:07 GMT
Brian, thanks for the quick response. My form has four fields that can be
used for search criteria. I have four Rules defined. The first rule checks to
see if all four fields are blank and prints an error msg. "Stop processing
rules when this rule finishes" is already checked.
InfoPath correctly bypasses the other rules when the first rule fires, but
Infopath runs my custom query anyway. Adding another Rule at the bottom to
always run the query would be redundant in this case since it already runs
the query without such a rule.
I wonder if I need to add some logic to my custom Jscript query...