<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Check if a field value is contained in a secondary data source</title><link>https://www.infopathdev.com:443/forums/thread/93258.aspx</link><pubDate>Wed, 25 Sep 2013 13:38:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93258</guid><dc:creator>Shrout1</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93258.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=93258</wfw:commentRss><description>&lt;p&gt;Thought of the solution while I was falling asleep last night; was sure to write it down!&lt;/p&gt;
&lt;p&gt;Look at the attached XSN file; it serves as a direct example how to accomplish this if my explanation is not clear.&lt;/p&gt;
&lt;p&gt;In the attached file I use a repeating group as the data source (rather than a secondary data source) since anyone will easily be able to recreate it. I use two fields to accomplish this validation rule:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;&amp;quot;New_Item&amp;quot;: This field is a textbox that the user can freely type&amp;nbsp;&amp;quot;Item_Numbers&amp;quot;&amp;nbsp;into.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&amp;quot;Validator&amp;quot;: This field is a read-only textbox. Its default value is the &amp;quot;Item_Number&amp;quot; field in the secondary data source.&lt;/div&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;This field is filtered by the &amp;quot;New_Item&amp;quot; field.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;If the &amp;quot;New_Item&amp;quot; field has an &amp;quot;Item_Number&amp;quot; entered into it that matches one in the secondary data source the &amp;quot;Validator&amp;quot; field will no longer be blank&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;If the &amp;quot;Validator&amp;quot; field is not blank it throws a validation error (validation rule triggered when the field is not blank)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;If the &amp;quot;Validator&amp;quot; field is not blank then a section with a warning message is no longer hidden and the user is notified that the field already exists.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;
&lt;p&gt;The idea here is that the form would feed back into the secondary data source and that each new &amp;quot;Item_Number&amp;quot; would become part of the secondary data source when the form is submitted. At this stage the form is not designed to be submitted, but is a proof of concept as to how one would execute this filter.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I hope this helps someone!&lt;/p&gt;</description></item><item><title>Check if a field value is contained in a secondary data source</title><link>https://www.infopathdev.com:443/forums/thread/93233.aspx</link><pubDate>Tue, 24 Sep 2013 17:42:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93233</guid><dc:creator>Shrout1</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93233.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=93233</wfw:commentRss><description>&lt;p&gt;I have a field that reaches into a database and pulls out some line item numbers; they are placed into a combo box. I&amp;#39;d like to make a separate field (that I can type into) that will give me an error if the value I type matches one of those line items (i.e an entry already contained within the combo box). Something like, &amp;quot;This item already exists&amp;quot;. Any way to do that with an XPath expression in a validation rule?&lt;/p&gt;</description></item></channel></rss>