Validation logic problem

C

Chandy

Hi,

I need to create what I would term a 'validation group' in an infopath
form. Basically, if one field has a value, all field must have a
value, but if none have a value, then the validation should pass.

I can get this working other than when I delete all values, infopath
still says all fields are required. It also seems to only show the
error messages when values are removed from fields, and not when they
are populated, but I can live with that.

So, can anyone tell me how to properly implement my validation,
without code?

If someone can do it for 3 fields then I will take that as proof. Use
fields:

text1
text2
text3

and tell me the data validation and rules (if any) that should be
placed on each of them.

Thanks!

Craig
 
A

Anuma(GGK Tech)

Hi,

Take three fields (field1, field2, field3). And add following two conditions
to every field.

For field1:
.. = "" and ../my:field2 != ""
.. = "" and ../my:field3 != ""

For Field2:
.. = "" and ../my:field3 != ""
.. = "" and ../my:field1 != ""

For Field3:

.. = "" and ../my:field1 != ""
.. = "" and ../my:field1 != ""

I hope this will help you.
 
C

Chandy

Thanks Anuma,

Works perfectly, once I changed the obvious typo on the last line.
Interesting that infopath translates the expression into object
references instead.

Craig
 

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