Hi,
I am using InfoPath 2007.
I have a form with a repleating field. I have set up some validation to check for duplicates in the list. The field is called Aliases and the validation is...
. = preceding-sibling::my:Aliases
and
. = following-sibling::my:Aliases
This works brilliantly - thank you for previous blogs and posts which helped me get that right.
I am shredding the data to SQL where it is part of a primary key. In SQL a value "xyz" is considered the same as "XYZ" so I need to do something to prevent those "duplicate" values.
So I have added the following validation
translate(., "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmopqrstuvwxyz") = translate(preceding-sibling::my:Aliases, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmopqrstuvwxyz")
and
translate(., "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmopqrstuvwxyz") = translate(following-sibling::my:Aliases, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmopqrstuvwxyz")
I thought this would do the trick, but this does not fire when values xyz and XYZ are put in the field.
Is this the correct thing to be doing? Is there another way to achieve it. Or do I have to move to code ? :(
Thank you
Catharine