Hi! I would have thought that the answer to my question was basic enough to be included in the Help files, or online, but so far no luck :-(
I have a template based on a schema where I needed to make an attribute to a field (called "EntryName") a unique key (I want to ensure the user doesn't use the same name twice for an entry):
<xs:key name="My_Key1">
<xs:selector xpath=".//mstns:TEXT_ENTRY" />
<xs:field xpath="@EntryName" />
</xs:key>
</xs:element>
Is InfoPath supposed to have the ability to produce a validation event if someone enters a duplicate value for "EntryName"? I'm used Visual Studio 2005 to create the schema, and an XML file I use to test it shows the validation error just fine, but InfoPath doesn't seem to do anything with it: I can enter a duplicate value without any warnings. I'm confused by this because, for example, if I have a simple type with a reg ex restriction, InfoPath will produce the red border around the field - and I guess I assumed that InfoPath would automatically produce a warning to anything that violates the schema rules.
Am I supposed to use validation rules (in the "EntryName" control properties) to produce a warning? If so, how would I do that? Is this done with an XPath expression? Does this have to do with "Master / Detail" relationships on a repeating section?
--- Francis