<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Repeating Table Validation for duplicate records</title><link>https://www.infopathdev.com:443/forums/thread/86184.aspx</link><pubDate>Fri, 18 Jan 2013 12:23:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:86184</guid><dc:creator>rvacchi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/86184.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=86184</wfw:commentRss><description>&lt;p&gt;Hi Aditya&lt;/p&gt;
&lt;p&gt;I hope you&amp;nbsp;are well. Managed to put the xpath query as a expression as data validation&lt;/p&gt;
&lt;p&gt;I did not understand this part&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;and add the message to display the dialogue box. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Here /my:myFields/my:group1/my:group2 -&amp;gt; repeating group xpath&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My:field2 -&amp;gt; field in repeating table&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I replicated the above with my field&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Repeating Table Validation for duplicate records</title><link>https://www.infopathdev.com:443/forums/thread/66149.aspx</link><pubDate>Tue, 26 Apr 2011 10:51:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66149</guid><dc:creator>barberj</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66149.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=66149</wfw:commentRss><description>&lt;p&gt;You can do this with conditional formatting.&lt;/p&gt;&lt;p&gt;Instead of testing for duplicates True or False, return the duplicate value. (Only problem here is what if more duplicate values? e.g. {1,2,2,4,4,5})&lt;/p&gt;&lt;p&gt;Store the duplicate value in a node and change formatting of the repeating item if it is = to duplicate value.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Repeating Table Validation for duplicate records</title><link>https://www.infopathdev.com:443/forums/thread/66148.aspx</link><pubDate>Tue, 26 Apr 2011 09:40:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66148</guid><dc:creator>lalitcdhake</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66148.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=66148</wfw:commentRss><description>&lt;p&gt;Hello, I think after so long time somebody facing this issue ...! anways. guys I applied all these steps equivalent to my infopath and datasource architecture. but unfortunatly i could not succeed. So i tried this last option to find duplicate in code behind, in which i got success , even i am showing the pop up box with message &amp;quot;Can not insert duplicate records&amp;quot;. but client requirement in i must be highlighht which row / record in the repeating table get duplicating. same like data validation (red dashed border). At my end , preceding sibling and following sibling are not working. so i chose code behind to find. what should be the reason these are not functioning? I i want to make dashed border erepeating table row from code behind , what i have to do . pleae guide. I am new in infopath actually. your guidance may save me from give up . thanks Jwells!&lt;/p&gt;</description></item><item><title>Re: Repeating Table Validation for duplicate records</title><link>https://www.infopathdev.com:443/forums/thread/57118.aspx</link><pubDate>Tue, 20 Jul 2010 13:53:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57118</guid><dc:creator>barberj</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57118.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=57118</wfw:commentRss><description>&lt;p&gt;I used code behind in the end.&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Private&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Function&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; searchForDuplicate(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xpNav &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; XPathNavigator, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xpIterator &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; XPathNodeIterator) &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Boolean&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; findItem &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; nodeset &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;New&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; List(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Of&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;br /&gt;While&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xpIterator.MoveNext&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; programme &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; = &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;&amp;quot;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;xpNav = xpIterator.Current&lt;br /&gt;nodeset.Add(xpNav.Value.Trim)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;While&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; countForDuplicates &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Integer&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;For&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Each&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; item &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;In&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; nodeset&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; item &amp;lt;&amp;gt; &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;findItem = item&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;For&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Each&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; item2 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;In&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; nodeset&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; findItem = item2 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;countForDuplicates += 1&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Next&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; countForDuplicates &amp;gt; 1 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&amp;#39; Duplicate found!&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Return&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;True&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Exit&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Function&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;countForDuplicates = 0&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Next&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Return&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;False&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Function&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: Repeating Table Validation for duplicate records</title><link>https://www.infopathdev.com:443/forums/thread/57106.aspx</link><pubDate>Tue, 20 Jul 2010 12:16:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57106</guid><dc:creator>SARISILVA</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57106.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=57106</wfw:commentRss><description>&lt;p&gt;Hi all, I have a similar situation. When I used the following code, it worked perfect, it successfully throws an error when duplicate values are entered.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;count(/my:myFields/my:group1/my:group2[my:field2 != &amp;quot;&amp;quot;]) &amp;gt;&amp;nbsp;&lt;/b&gt;
 &lt;/p&gt;&lt;p&gt;&lt;b&gt;(. = 
../preceding-sibling::my:group2/my:field2 or . = 
../following-sibling::my:group2/my:field2)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;However, in my situation, I have another field in the repeating table, lets say field1. If the text in field1 is the same in any of two or more rows in the repeating table, then field 2 value cannot be the same for the same rows. e.g, in the below example, FIELD2 CANNOT have 55 in both the rows, since the value of FIELD1 is the same (Henry), in both of these rows, as in this example.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;FIELD1 &amp;nbsp;&amp;nbsp; FIELD2 &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Henry&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 55&lt;/p&gt;&lt;p&gt;Henry &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 55 &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;However if the value in FIELD1 is different, then FIELD2 should allow duplicate values like shown below:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;FIELD1 &amp;nbsp;&amp;nbsp; FIELD2 &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Henry&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 55&lt;/p&gt;
&lt;p&gt;George &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 55 &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;How should my expression be formed. Any help is greatly appreciated :) &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Repeating Table Validation for duplicate records</title><link>https://www.infopathdev.com:443/forums/thread/54038.aspx</link><pubDate>Thu, 22 Apr 2010 15:47:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54038</guid><dc:creator>barberj</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54038.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54038</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;After studying this for some time I cannot get this to work.&lt;/p&gt;&lt;p&gt;The first part &lt;/p&gt;&lt;p&gt;&lt;b&gt;count(/my:myFields/my:group1/my:group2[my:field2 != &amp;quot;&amp;quot;]) &amp;gt; 1&lt;/b&gt; &lt;/p&gt;&lt;p&gt;is working ok but I cannot find any working examples of preceding-sibling or following-sibling&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;(. = ../preceding-sibling::my:group2/my:field2 or . = 
../following-sibling::my:group2/my:field2)&lt;/b&gt; &lt;/p&gt;&lt;p&gt;I had a look at &lt;a href="http://www.infopathdev.com/blogs/greg/archive/2005/06/13/Using-XPath_2700_s-_2700_preceding_2D00_sibling_2700_-Axis-Correctly.aspx"&gt;this blog article&lt;/a&gt; but it&amp;#39;s a bit too vague for me.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Repeating Table Validation for duplicate records</title><link>https://www.infopathdev.com:443/forums/thread/51997.aspx</link><pubDate>Sun, 21 Feb 2010 22:42:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51997</guid><dc:creator>Aditya</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51997.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=51997</wfw:commentRss><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;I am also looking for something like this solution.I had a text box where user can enter data.That textbox is in repeating table.I want to make sure user have not typed same data in different tables.&lt;/p&gt;
&lt;p&gt;Xpath for the field to validate:/my:Main/my:Titles/my:Details/my:IMNDetails/my:CRFH_IMN1&lt;/p&gt;
&lt;p&gt;Xpath for the group:/my:Main/my:Titles/my:Details/my:IMNDetails&lt;/p&gt;
&lt;p&gt;Now can u please help me where can i set the data validation&amp;nbsp; said in the below lines.ie;do i need to set that for the field&amp;#39;s(textbox) data validation&amp;nbsp;?&lt;/p&gt;
&lt;p&gt;---------------------------------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;You can avoid the duplicate values by putting the following expressions as data validation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;count(/my:myFields/my:group1/my:group2[my:field2 != &amp;quot;&amp;quot;]) &amp;gt; 1 and (. = ../preceding-sibling::my:group2/my:field2 or . = ../following-sibling::my:group2/my:field2)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;and add the message to display the dialogue box. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Here /my:myFields/my:group1/my:group2 -&amp;gt; repeating group xpath&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My:field2 -&amp;gt; field in repeating table&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;----------------------------------------------------------------------------------------------------------------------&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Re: Repeating Table Validation for duplicate records</title><link>https://www.infopathdev.com:443/forums/thread/39886.aspx</link><pubDate>Mon, 23 Mar 2009 21:45:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39886</guid><dc:creator>mako0201</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39886.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=39886</wfw:commentRss><description>&lt;p&gt;I want to follow up on this solution with the following scenario. &lt;/p&gt;
&lt;p&gt;I have a repeating table with a dropdown controls. The dropdown&amp;nbsp;has&amp;nbsp;its data validation set up with the suggested expression.&lt;/p&gt;
&lt;p&gt;Validation works just fine when a row&amp;nbsp;is added to the table and&amp;nbsp;a duplicate value&amp;nbsp;is selected in the dropdown. The problem with it though that when I change the value&amp;nbsp;of a sibling item&amp;nbsp;with the same value the validation message does not clear off from the added dropdown even though it is not a duplicate anymore.&lt;/p&gt;
&lt;p&gt;It looks like validation event does not fire. Is this happening because the change is made on a different row?&lt;/p&gt;
&lt;p&gt;I would appreciate if somebody&amp;nbsp;can suggest how to handle this. Thanks.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Repeating Table Validation for duplicate records</title><link>https://www.infopathdev.com:443/forums/thread/38244.aspx</link><pubDate>Mon, 09 Feb 2009 17:59:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38244</guid><dc:creator>InfoPathNovice</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38244.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=38244</wfw:commentRss><description>&lt;p&gt;swathip,&lt;/p&gt;
&lt;p&gt;Thanks for your reply. Your solution worked like a charm. &lt;/p&gt;
&lt;p&gt;This expression won&amp;#39;t check for uppercase or lowercase. (Example: If i enter &amp;quot;infopath&amp;quot; and have &amp;quot;INFOPATH&amp;quot; already in repeating table then it wont display message. It considers as different values). &lt;/p&gt;
&lt;p&gt;I modified default value setting for textbox(my:field2) to&amp;nbsp;&amp;quot;&lt;strong&gt;translate(., &amp;quot;abcdefghijklmnopqrstuvwxyz&amp;quot;, &amp;quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&amp;quot;)&lt;/strong&gt;&amp;quot;. This expression converts input value to Uppercase.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Again, Thanks for your help. Have a nice day...&lt;/p&gt;</description></item><item><title>Re: Repeating Table Validation for duplicate records</title><link>https://www.infopathdev.com:443/forums/thread/38190.aspx</link><pubDate>Sat, 07 Feb 2009 06:10:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38190</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38190.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=38190</wfw:commentRss><description>Hi, 
&lt;p&gt;You can avoid the duplicate values by putting the following expressions as data validation.&lt;/p&gt;
&lt;p&gt;count(/my:myFields/my:group1/my:group2[my:field2 != &amp;quot;&amp;quot;]) &amp;gt; 1 and (. = ../preceding-sibling::my:group2/my:field2 or . = ../following-sibling::my:group2/my:field2)&lt;/p&gt;
&lt;p&gt;and add the message to display the dialogue box. &lt;/p&gt;
&lt;p&gt;Here /my:myFields/my:group1/my:group2 -&amp;gt; repeating group xpath&lt;/p&gt;
&lt;p&gt;My:field2 -&amp;gt; field in repeating table&lt;/p&gt;</description></item><item><title>Repeating Table Validation for duplicate records</title><link>https://www.infopathdev.com:443/forums/thread/38182.aspx</link><pubDate>Fri, 06 Feb 2009 21:18:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38182</guid><dc:creator>InfoPathNovice</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38182.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=38182</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In repeating table, when user inserts new item, I want to check for duplicate record in repeating table. If user enters any existing record (e.g:&amp;nbsp;&amp;quot;MaterialID&amp;quot;) then display message box otherwise allow user to enter new Material ID. Any thoughts ?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks is advance.&lt;/p&gt;</description></item></channel></rss>