<?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: Delete rows in a repeating table that satisfy certain criterion</title><link>https://www.infopathdev.com:443/forums/thread/50800.aspx</link><pubDate>Wed, 20 Jan 2010 19:42:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50800</guid><dc:creator>ricomarcelo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50800.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=50800</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m sorry I didn&amp;#39;t realize I got a response&amp;nbsp;for my post on this thread. I have to search through my older posts to see it. Anyways, thanks Hilary... I already found a fix for the said problem.&lt;/p&gt;</description></item><item><title>Re: Delete rows in a repeating table that satisfy certain criterion</title><link>https://www.infopathdev.com:443/forums/thread/50154.aspx</link><pubDate>Wed, 23 Dec 2009 22:28:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50154</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50154.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=50154</wfw:commentRss><description>&lt;p&gt;Hi:&lt;/p&gt;
&lt;p&gt;I&amp;#39;m betting you haven&amp;#39;t replaced a sample xpath in the code sample with your own xpath. Where the code sample says: &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;/dfs:myFields/dfs:dataFields/d:tblMaster/d:tblDetail&amp;quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;you need to put in the xpath to your own repeating group. Are you using InfoPath 2003 or 2007? If you are using 2007, you may want to consider using VSTA and managed code rather than jscript. If you need help figuring out the xpath to your repeating group, you can post a screenshot of your Main data source with the folders expanded to show the group you want to delete rows from.&lt;/p&gt;
&lt;p&gt;You can attach a file to your reply post under the Options tab.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Delete rows in a repeating table that satisfy certain criterion</title><link>https://www.infopathdev.com:443/forums/thread/50127.aspx</link><pubDate>Tue, 22 Dec 2009 19:17:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50127</guid><dc:creator>ricomarcelo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50127.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=50127</wfw:commentRss><description>&lt;p&gt;Hi guys,&lt;/p&gt;
&lt;p&gt;I was trying out&amp;nbsp;a jscript version of the code above&amp;nbsp;to delete all rows in my repeating table. So I came up with the following code unfortunately I&amp;#39;m getting an error message:&lt;/p&gt;
&lt;p&gt;var rowList = XDocument.DOM.selectNodes(&amp;quot;/dfs:myFields/dfs:dataFields/d:tblMaster/d:tblDetail&amp;quot;);&lt;/p&gt;
&lt;p&gt;for (var row in rowList)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;row.parentNode.removeChild(row);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Can anybody point out what I&amp;#39;m missing? Thanks&lt;/p&gt;</description></item><item><title>Re: Delete rows in a repeating table that satisfy certain criterion</title><link>https://www.infopathdev.com:443/forums/thread/48543.aspx</link><pubDate>Tue, 03 Nov 2009 09:14:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48543</guid><dc:creator>kelsawy2000</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48543.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=48543</wfw:commentRss><description>&lt;p&gt;Thank you very much for the xample.&amp;nbsp; It worked for me.&lt;/p&gt;</description></item><item><title>Re: Delete rows in a repeating table that satisfy certain criterion</title><link>https://www.infopathdev.com:443/forums/thread/48535.aspx</link><pubDate>Tue, 03 Nov 2009 04:08:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48535</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48535.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=48535</wfw:commentRss><description>&lt;p&gt;The code would be something like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Dim rowList&lt;br /&gt;Set rowList = XDocument.DOM.selectNodes(&amp;quot;/my:myFields/my:group1/my:group2&amp;quot;)&lt;br /&gt;&lt;br /&gt;For Each row In rowList&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim field1Value
		&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field1Value = row.selectSingleNode(&amp;quot;my:field1&amp;quot;).text
		&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim field2Value
		&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field2Value = row.selectSingleNode(&amp;quot;my:field2&amp;quot;).text
		&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; Add your field value checks here&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (field1Value = &amp;quot;7&amp;quot;) or (field1Value = &amp;quot;hello&amp;quot; and field2Value = &amp;quot;2&amp;quot;) Then&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.parentNode.removeChild(row)&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If &lt;br /&gt;Next &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;You&amp;#39;ll naturally need to use your own appropriate XPath and conditional logic.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Delete rows in a repeating table that satisfy certain criterion</title><link>https://www.infopathdev.com:443/forums/thread/48491.aspx</link><pubDate>Mon, 02 Nov 2009 06:29:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48491</guid><dc:creator>kelsawy2000</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48491.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=48491</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have a form with one button and&amp;nbsp;one repeating table (Table1).&amp;nbsp; The repeating table has&amp;nbsp;textbox and date controls.&amp;nbsp; My data source is&lt;/p&gt;
&lt;p&gt;Table1&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Textbox1&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date1&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am using VB script. I want to&amp;nbsp;creat a code that, when I click on the button, will&amp;nbsp;DELETE some rows from the repeating table if they satisfy a certain criterion (or criteria) like&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp;Textbox1 = &amp;quot;this&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Textbox1 = 1&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Date1 = &amp;quot;4/5/2009&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Date1 is before three days ago&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Textbox1 = 1&amp;nbsp;&amp;nbsp;&amp;nbsp; AND&amp;nbsp;&amp;nbsp;&amp;nbsp;Date1=&amp;quot;3/5/2009&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you in advance for your help.&lt;/p&gt;
&lt;p&gt;Khaled&lt;/p&gt;</description></item></channel></rss>