<?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: Populate repeating table cell value after button insert</title><link>https://www.infopathdev.com:443/forums/thread/90491.aspx</link><pubDate>Fri, 07 Jun 2013 11:55:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:90491</guid><dc:creator>Tughsol</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/90491.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=90491</wfw:commentRss><description>&lt;p&gt;You can do this without using code. &lt;/p&gt;&lt;p&gt;You would use the Concat Function to merge the word Control with the Preceding-Sibling Function (which will count the rows and add 1). &lt;/p&gt;&lt;p&gt;The default value for that field would be: concat(&amp;quot;Control &amp;quot;, count(preceding-sibling::*) + 1)&lt;/p&gt;&lt;p&gt;I hope this helps.&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Populate repeating table cell value after button insert</title><link>https://www.infopathdev.com:443/forums/thread/89569.aspx</link><pubDate>Tue, 07 May 2013 20:29:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:89569</guid><dc:creator>MattyG</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/89569.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=89569</wfw:commentRss><description>&lt;p&gt;Hello. Sorry (again)&amp;nbsp;if the information for my question is already posted but I am new to Infopath (2007) and the examples I have found in the threads do not solve my issue...&lt;/p&gt;
&lt;p&gt;I have a repeating table with a button to insert a new row. Upon clicking the button, the current row is copied into the new row. However, I would like to overwrite a cell value. For example, on the current row is&amp;nbsp;a value &amp;quot;Control 1&amp;quot; in the &amp;quot;Controls&amp;quot; field, when the button is clicked, i would like the &amp;quot;Control&amp;quot; value in the new row to be &amp;quot;Control 2&amp;quot;. Below is the code i have:&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&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.InsertAfter(Group);&lt;/p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;
&lt;p&gt;//the above works&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;newRow.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;my:Controls&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;).Value = (&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;Control 2&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;); &lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;//this does not&amp;nbsp;work&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;&lt;font size="2"&gt;Ideally i would like to end up with the control number being the current row + 1.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font size="2"&gt;I hope that makes sense, and any help is appreciated.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Many Thanks, Matt.&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>