Hi Everyone,
It has been a bit of time between posts for me, but since the expertise was so great last time I thought I would try again.
Firstly a bit of background info. The client is using Infopath 2003 and the form I have to modify is in production already so I am unable to modify the XSD template. I had fixed my problem by adding one simple node but unfortunately this breaks all the forms created thus far :(
Anyway, onto the problem at hand. Within the form we have a repeating list, I will call this AAA. Within AAA there are another two repeating dropdown lists. Lets call them BBB and CCC. Now, the client wants the following validation to occur -
* When the form is opened for the first time BBB and CCC must both be mandatory
* If a value is selected in BBB make the dropdown list of CCC optional (red asterisk to disappear).
* Likewise, if a value is selected in CCC make the dropdown list of BBB optional (red asterisk to disappear).
* Each instance of AAA must validate BBB and CCC as outlined above
The above validation is to also occur when another repetition of BBB or CCC is inserted. So the first record may be blank and a item is selected in the second dropdown list.
I have tried using "sum" to add up the nodes of each repeating list BBB and CCC but have not been able to get it to function correctly (obviously why I am asking on here....). I am not 100% sure why though as when debugging my validation using expression boxes it seems to work as intended. Eg, I placed the expression box with the repeating section of BBB the tried "sum(../../ns1:BBB/ns1:node)", when blank this returned 0 or when a value was inserted it would sum the ID of the dropdown list. The figure would be irrelevant as I was just after if it was greater than zero (ie an entry had been chosen).
Another thought I had was, my validation my night be occurring as I am attempting to sum up blank / null values and possibly I am not comparing them correctly????
So that is my problem, hopefully some with more knowledge than me could point me in the right direct. I would be muchly appreciated.
Thanks In Advance,
Brett from Qld Aust :)