<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Repeating table - "Insert row after" code</title><link>https://www.infopathdev.com:443/forums/thread/95055.aspx</link><pubDate>Tue, 07 Jan 2014 18:51:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95055</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95055.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=95055</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m assuming the code is on the button and the button is inside the repeating NewAssessment table / section?&lt;/p&gt;&lt;font color="#2b91af" size="2" face="Consolas"&gt;&lt;font color="#2b91af" size="2" face="Consolas"&gt;&lt;font color="#2b91af" size="2" face="Consolas"&gt;
&lt;p&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt; Group = e.Source;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2" face="Consolas"&gt;&lt;font color="#008000" size="2" face="Consolas"&gt;&lt;font color="#008000" size="2" face="Consolas"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2" face="Consolas"&gt;&lt;font color="#2b91af" size="2" face="Consolas"&gt;&lt;font color="#2b91af" size="2" face="Consolas"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt; newRow = Group.Clone();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt; 
&lt;p&gt;newRow.InsertBefore(Group);&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Repeating table - "Insert row after" code</title><link>https://www.infopathdev.com:443/forums/thread/94973.aspx</link><pubDate>Thu, 02 Jan 2014 14:49:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:94973</guid><dc:creator>MattyG</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/94973.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=94973</wfw:commentRss><description>&lt;p&gt;Hi there and Happy new year !&lt;/p&gt;
&lt;p&gt;On a repeating table, there is the option to insert a new row after the current row. I am trying to do this in code but cannot get it to work. The reason I am doing it in code is because I am copying values from the current row into the new row. I am trying to use a button to perform this. There is a button on each row, so when the user clicks it, a new row is inserted after that row (not after the last row in the table).&lt;/p&gt;
&lt;p&gt;My data source looks like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;myfields&lt;/div&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;NewAssessments&lt;/div&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;NewAssessment&lt;/div&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Title&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;RiskNo&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;LineNumber&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;RAVersion&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Year&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;
&lt;p&gt;I have code like the following:&lt;/p&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; Group = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:NewAssessments/my:NewAssessment[current()]&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; newRow = Group.Clone();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;newRow.InsertBefore(Group);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any help would be appreciated. Thank you.&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>