<?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: Prevent double entries in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/7153.aspx</link><pubDate>Wed, 13 Jul 2005 22:37:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7153</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7153.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7153</wfw:commentRss><description>//get new value of the present row&lt;br /&gt;string sNewValue = e.NewValue.ToString();&lt;br /&gt;				&lt;br /&gt;//get the repeating nodes, "RepeatingNode" here you need to write the xpath so that you will get only the nodes which are equall to the new value&lt;br /&gt;&lt;br /&gt;IXMLDOMNodeList oNodeList = getNodes(string.Format("//RepeatingNode[. = {0}]", sNewValue));&lt;br /&gt;			&lt;br /&gt;//check if the length of the nodelist is greater than 1&lt;br /&gt;if(oNodeList.length &amp;gt; 1)&lt;br /&gt;   return;&lt;br /&gt;else &lt;br /&gt;   //throw an error and empty the present node&lt;br /&gt;				&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPathDev India</description></item><item><title>Re: Prevent double entries in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/7152.aspx</link><pubDate>Wed, 13 Jul 2005 22:15:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7152</guid><dc:creator>Richard</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7152.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7152</wfw:commentRss><description>Hi , &lt;br /&gt;&lt;br /&gt;Try this: &lt;br /&gt;&lt;br /&gt;Each time the user inputs in the field,  On_After_Change, check the previous entries in the previous rows in the table:&lt;br /&gt;&lt;br /&gt;For this you need to have a RowCount, &lt;br /&gt;( Right clck on my:fileds, and add a text field,name it rowcounter ) , and for the value have the following xpath:&lt;br /&gt;count(../my:Choices/my:Choice) , where the Choice is the name of the table that repeats.&lt;br /&gt;Now you have a rowcounter that updates each time. &lt;br /&gt;to get this in integer form  in your code you do this:&lt;br /&gt;&lt;br /&gt;int rc =  System.Convert.ToInt16( thisXDocument.DOM.selectSingleNode("/my:myFields//my:rowcounter").text);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;On_After_Change for the field you want, do something like this:&lt;br /&gt;	&lt;br /&gt;for (i = 1;i&amp;lt;= rc ;i++)&lt;br /&gt;	{&lt;br /&gt;// compare your current text  with this for every row, except the current one.&lt;br /&gt;thisXDocument.DOM.selectSingleNode("/my:myFields//my:Choices/my:Choice["+System.Convert.ToString(i)+"]/my:productnumber").text ;&lt;br /&gt;&lt;br /&gt;	}&lt;br /&gt;or build an xpath filter excluding the previous row values.&lt;br /&gt;&lt;br /&gt;Hope this helps..&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Prevent double entries in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/7151.aspx</link><pubDate>Wed, 13 Jul 2005 20:40:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7151</guid><dc:creator>bennybuchle</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7151.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7151</wfw:commentRss><description>Hi Agni&lt;br /&gt;&lt;br /&gt;Thanks for your fast answer.&lt;br /&gt;Hmm, unfortunately i'm a newbie in coding. Can you give me support for the beginning. Some kind of code for demo?&lt;br /&gt;&lt;br /&gt;Could there be an other possibility if i merge the double entries when i store the data in my database?&lt;br /&gt;In these case, the entries in the quantity fields must adds. Is the perhaps a solution?&lt;br /&gt;&lt;br /&gt;Thanks Benny</description></item><item><title>Re: Prevent double entries in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/7150.aspx</link><pubDate>Wed, 13 Jul 2005 17:02:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:7150</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/7150.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=7150</wfw:commentRss><description>Hi Benny, &lt;br /&gt;Welcome to the forum!&lt;br /&gt;Even I had a similar problem before. I dint get a way to do this in InfoPath. So i had write code for this.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPathDev India</description></item><item><title>Prevent double entries in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/4776.aspx</link><pubDate>Wed, 13 Jul 2005 16:26:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4776</guid><dc:creator>bennybuchle</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4776.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4776</wfw:commentRss><description>I have a repeating table in my form with the fields product number, Product and Quantity. These table is linked with a secondary data source on my SQL Server where all products are listed. The user files in the product number in the table. The product field comes then from the secondary data source. With a data validation I check if the product number is existing in the data source.&lt;br /&gt;&lt;br /&gt;Now to my problem:&lt;br /&gt;It#%92s important that no double product numbers can be filled in in the repeating table. How can I prevent double entries in these repeating table?&lt;br /&gt;&lt;br /&gt;Thanks for your help!&lt;br /&gt;&lt;br /&gt;Benny&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>