Making a field mandatory based on contents of other fields

M

Monomeeth

Hello Everyone

My apologies if this has been asked/answered before.

What I want to do is make a field mandatory only if an earlier field has the
value "Yes" in it.

I have seen that I can set rules and validations and display dialogue
messages, but I am looking for a better solution for my needs.

Any help would be greatly appreciated.

Joe.
 
M

Monomeeth

Okay, well, I've just solved my own question, even though it doesn't make
sense. Nevertheless, it works and that's all that matters!

Basically, I set some Data Validation on Field 2 so that should Field 2 be
blank AND Field 1 be "Yes", then display a dialog box alert with a message
that Field 2 is compulsory because you have answered "Yes" at Field 1.

For some reason, Infopath adds a red asterisk to Field 2 and makes it
mandatory, even though I have not selected the "Cannot be blank" checkbox. In
theory, what I have done should only display a dialogue box if the conditions
are met, not make the field mandatory. Nevertheless, it suits my purposes
and I'm happy.

Hopefully this may help someone else here.
 

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