Making Query Fields Required

R

ridawg

Hey,

I'm trying to make a query field (dropdown box) required so that when a user
clicks the query button a check is made against the query field making sure
the user has made a selection from the dropdown field.

I thought this would be pretty easy to do using either a rule but when you
use the default query button you don't have the option to create rules.

I have two forms I need this functionality for. My first form has just one
query field (dropdown) and I need the user to make a selection. I have a
second form I created that has several query fields and I would like to
require that at least one field has a value.

Thanks for the help!
 
S

S.Y.M. Wong-A-Ton

You can add a normal button control with a rule to query the main connection
of your form. This will give you the same functionality as the standard
"Query" button of InfoPath. Then you can add a condition on this rule to let
the rule run only when the dropdown is not blank. Add a second rule to the
button to show a message box when the dropdown is blank (= condition on the
second rule). Apply the same concept to your second form.
 
R

ridawg

Works great! Thanks for the help.

--
-ridawg


S.Y.M. Wong-A-Ton said:
You can add a normal button control with a rule to query the main connection
of your form. This will give you the same functionality as the standard
"Query" button of InfoPath. Then you can add a condition on this rule to let
the rule run only when the dropdown is not blank. Add a second rule to the
button to show a message box when the dropdown is blank (= condition on the
second rule). Apply the same concept to your second form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top