<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>How to get alerts for non-unique value?</title><link>https://www.infopathdev.com:443/forums/thread/21592.aspx</link><pubDate>Tue, 10 Jul 2007 13:45:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21592</guid><dc:creator>Francis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21592.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21592</wfw:commentRss><description>Hi! I would have thought that&amp;nbsp;the&amp;nbsp;answer&amp;nbsp;to my question was basic enough to be included in the Help files, or&amp;nbsp;online,&amp;nbsp;but&amp;nbsp;so&amp;nbsp;far&amp;nbsp;no&amp;nbsp;luck :-(&lt;br /&gt;&lt;br /&gt;I have a template based on a schema where I needed to make an attribute to a field (called &amp;quot;EntryName&amp;quot;) a unique key (I want to ensure the user doesn&amp;#39;t use the same name twice for an entry):&lt;br /&gt;&lt;blockquote&gt;    &amp;lt;xs:key name=&amp;quot;My_Key1&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;xs:selector xpath=&amp;quot;.//mstns:TEXT_ENTRY&amp;quot; /&amp;gt;&lt;br /&gt;      &amp;lt;xs:field xpath=&amp;quot;@EntryName&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;/xs:key&amp;gt;&lt;br /&gt;  &amp;lt;/xs:element&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;Is InfoPath supposed to have the ability to produce a validation event if someone enters a duplicate value for &amp;quot;EntryName&amp;quot;? I&amp;#39;m used Visual Studio 2005 to&amp;nbsp;create the schema, and an XML file I use to test it shows the validation error just fine, but InfoPath doesn&amp;#39;t seem to do anything with it: I can enter a duplicate value without any warnings. I&amp;#39;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.&lt;br /&gt;&lt;br /&gt;Am I supposed to use validation rules (in the &amp;quot;EntryName&amp;quot; control properties) to produce a warning? If so, how would I do that? Is this done with an XPath expression? Does&amp;nbsp;this&amp;nbsp;have&amp;nbsp;to&amp;nbsp;do&amp;nbsp;with&amp;nbsp;&amp;quot;Master&amp;nbsp;/&amp;nbsp;Detail&amp;quot;&amp;nbsp;relationships&amp;nbsp;on&amp;nbsp;a&amp;nbsp;repeating&amp;nbsp;section?&lt;br /&gt; &lt;br /&gt;--- Francis&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>