<?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: Delete Empty Row in a Repeating Table</title><link>https://www.infopathdev.com:443/forums/thread/89038.aspx</link><pubDate>Fri, 19 Apr 2013 21:09:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:89038</guid><dc:creator>Jean-Francois</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/89038.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=89038</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve tried to use the code above but am still getting many errrors.&amp;nbsp;&amp;nbsp; Can you help through this?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I want this as a validating code to essentially delete any records where my repeating table brandcode and brandalloc fields are empty.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Public&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;Sub&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; tblbrandalloc_Validating(&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; sender &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;Object&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;ByVal&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e &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; XmlValidatingEventArgs)&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; Write your code here.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;var objXMLNode;&lt;/p&gt;objXMLNode = XDocument.DOM.selectNodes(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;//dfs:myFields/dfs:dataFields/d:tblfrmid/d:tblCouponMaster/d:tblbrandalloc[d:brandcode=&amp;quot;&amp;quot; and d:brandalloc=&amp;quot;&amp;quot;]&amp;quot;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;objXMLNode.removeAll(); &lt;/p&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;Sub&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Delete Empty Row in a Repeating Table</title><link>https://www.infopathdev.com:443/forums/thread/19364.aspx</link><pubDate>Wed, 25 Apr 2007 21:52:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19364</guid><dc:creator>Tome</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19364.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19364</wfw:commentRss><description>&lt;p&gt;Done!!&lt;/p&gt;&lt;p&gt;Thanks for all the help guys. I thought I had tried it already, but the code below worked like a champ.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;	var objXMLNode;&lt;/p&gt;&lt;p&gt;objXMLNode = XDocument.DOM.selectNodes(&amp;quot;//dfs:myFields/dfs:dataFields/d:Service_Receipts/d:SR_Employees[@empID = &amp;#39;&amp;#39;]&amp;quot;);&lt;/p&gt;&lt;p&gt;objXMLNode.removeAll();&amp;nbsp;
&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Delete Empty Row in a Repeating Table</title><link>https://www.infopathdev.com:443/forums/thread/19362.aspx</link><pubDate>Wed, 25 Apr 2007 19:03:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19362</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19362.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19362</wfw:commentRss><description>&lt;p&gt;Hi Tome,&lt;/p&gt;&lt;p&gt;You are using &lt;b&gt;//&lt;/b&gt; to starting of your XPath may be that is one thing it goes to wrong. You can use only &lt;b&gt;/&lt;/b&gt; to the starting of your XPath. You need to verify if &lt;b&gt;d&lt;/b&gt; prefix is required or not for &amp;#39;Service_Receipts&amp;#39; and &amp;#39;SR_Employees&amp;#39; node. Check once again your XPath.&lt;/p&gt;</description></item><item><title>Re: Delete Empty Row in a Repeating Table</title><link>https://www.infopathdev.com:443/forums/thread/19341.aspx</link><pubDate>Wed, 25 Apr 2007 07:17:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19341</guid><dc:creator>madhuri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19341.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19341</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;&lt;p&gt;i think prefix is missing for an &amp;#39;empID&amp;#39;. If the &amp;#39;EmpID is an element then you should add &amp;#39;d:&amp;#39; ,if it is an attribute then you should add &lt;a href="mailto:&amp;#39;@&amp;#39;"&gt;&amp;#39; @ &amp;#39;&lt;/a&gt;&amp;nbsp;.&lt;/p&gt;&lt;p&gt;if empID is an element then the code&amp;nbsp;should be&amp;nbsp;&lt;/p&gt;&lt;p&gt;objXMLNode = XDocument.DOM.selectNodes(&amp;quot;//dfs:myFields/dfs:dataFields/d:Service_Receipts/d:SR_Employees[d:empID = &amp;#39;&amp;#39;]&amp;quot;);&lt;/p&gt;&lt;p&gt;if the empID is an attribute then the code should be &lt;/p&gt;&lt;p&gt;objXMLNode = XDocument.DOM.selectNodes(&amp;quot;//dfs:myFields/dfs:dataFields/d:Service_Receipts/d:SR_Employees[@empID = &amp;#39;&amp;#39;]&amp;quot;);&lt;/p&gt;</description></item><item><title>Re: Delete Empty Row in a Repeating Table</title><link>https://www.infopathdev.com:443/forums/thread/19339.aspx</link><pubDate>Tue, 24 Apr 2007 23:41:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19339</guid><dc:creator>Tome</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19339.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19339</wfw:commentRss><description>&lt;p&gt;Great..&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;var objXMLNode;&lt;/p&gt;&lt;p&gt;objXMLNode = XDocument.DOM.selectNodes(&amp;quot;//dfs:myFields/dfs:dataFields/d:Service_Receipts/d:SR_Employees&amp;quot;); &lt;/p&gt;&lt;p&gt;objXMLNode.removeAll();&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Thanks for the code. I&amp;#39;ve started&amp;nbsp;adapting it to my form. I can delete all records in the Employees section using the code above. But when&amp;nbsp;I modify the selectNodes line to select&amp;nbsp;records with&amp;nbsp;no employees&amp;nbsp;(code below) nothing happens. Not sure what exactly im doing wrong with it.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;objXMLNode = XDocument.DOM.selectNodes(&amp;quot;//dfs:myFields/dfs:dataFields/d:Service_Receipts/d:SR_Employees[empID = &amp;#39;&amp;#39;]&amp;quot;);&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Delete Empty Row in a Repeating Table</title><link>https://www.infopathdev.com:443/forums/thread/19282.aspx</link><pubDate>Sun, 22 Apr 2007 05:39:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19282</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19282.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19282</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;You need to remove the empry rows before submitting the sharepoint or database then you need to write the following code to remove those empty rows.&lt;/p&gt;&lt;p&gt;//This statement gives the whichever you have all empty rows in repeating section.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;IXMLDOMSelection&amp;nbsp;emptyRows = (IXMLDOMSelection)thisXDocument.DOM.selectNodes(&amp;quot;..\..\my:RepeatingSectionNodeName[my:field1 = &amp;#39;&amp;#39; and my:field2 = &amp;#39;&amp;#39;]&amp;quot;);&lt;/p&gt;&lt;p&gt;//This statement removes the all rows which are empty ones&amp;nbsp;&lt;/p&gt;&lt;p&gt;emptyRows.removeAll();&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Delete Empty Row in a Repeating Table</title><link>https://www.infopathdev.com:443/forums/thread/19263.aspx</link><pubDate>Fri, 20 Apr 2007 14:50:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19263</guid><dc:creator>ahardin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19263.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19263</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;&lt;p&gt;&amp;nbsp;Welcome to the forums.&lt;/p&gt;&lt;p&gt;First off this would have to be done in code run before the submit but it is altogether easier to allow users to delete lines and use valuidation to prevent submission until the line is deleted.&lt;/p&gt;&lt;p&gt;You could also have a rule that sets another field called CHECK&amp;nbsp;on the end of your row that is invisible to the user&amp;nbsp;that says if the frist row and first column is not blank then set the CHECK field to OK, then use conditional formatting to prevent users from adding to or deleting the control unless all instances of CHECK are not equal to OK.&lt;/p&gt;&lt;p&gt;I hope this helps&lt;/p&gt;&lt;p&gt;Adam&lt;/p&gt;</description></item><item><title>Delete Empty Row in a Repeating Table</title><link>https://www.infopathdev.com:443/forums/thread/19223.aspx</link><pubDate>Thu, 19 Apr 2007 19:42:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19223</guid><dc:creator>Tome</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19223.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19223</wfw:commentRss><description>&lt;p&gt;What I am attempting to do is write jscript to determine if there is a blank row in one of my repeating tables. I removed the ability for users to delete rows but I need to remove blank ones just before I submit to sharepoint and the database. Any hints in regards to how I could do this, would be great.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>