How to get alerts for non-unique value? - InfoPath Dev
in

InfoPath Dev

How to get alerts for non-unique value?

Last post 07-10-2007 06:45 AM by Francis. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 07-10-2007 06:45 AM

    • Francis
    • Not Ranked
      Male
    • Joined on 05-22-2007
    • Albany, NY USA
    • Posts 4

    How to get alerts for non-unique value?

    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

    --- Francis
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.