<?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: [last()] method in Infopath 2010 Repeating Tables Not Working</title><link>https://www.infopathdev.com:443/forums/thread/70012.aspx</link><pubDate>Mon, 05 Sep 2011 10:49:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:70012</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/70012.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=70012</wfw:commentRss><description>&lt;p&gt;I can&amp;#39;t think of any explanation for this behavior and would need to see your form and its code to come any closer to figuring it out.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;So you know, qRules provides an &lt;strong&gt;Insert&lt;/strong&gt; command that accomplishes what you are trying to do here, and uses a more reliable approach (your approach here, copying the last node of the group, will fail if the group is empty).&lt;/p&gt;
&lt;p&gt;I also have a short blog post that describes another alternative:&lt;br /&gt;&lt;a href="http://www.infopathdev.com/blogs/jimmy/archive/2009/03/06/automatically-adding-rows-to-repeating-sections.aspx"&gt;http://www.infopathdev.com/blogs/jimmy/archive/2009/03/06/automatically-adding-rows-to-repeating-sections.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: [last()] method in Infopath 2010 Repeating Tables Not Working</title><link>https://www.infopathdev.com:443/forums/thread/70009.aspx</link><pubDate>Mon, 05 Sep 2011 08:34:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:70009</guid><dc:creator>nollaig</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/70009.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=70009</wfw:commentRss><description>&lt;p&gt;Anyone got any ideas??&lt;/p&gt;</description></item><item><title>Re: [last()] method in Infopath 2010 Repeating Tables Not Working</title><link>https://www.infopathdev.com:443/forums/thread/69872.aspx</link><pubDate>Wed, 31 Aug 2011 07:21:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69872</guid><dc:creator>nollaig</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69872.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=69872</wfw:commentRss><description>&lt;p&gt;An example would be a repeating table with each row containing a dropdown and a textbox. There are 6 rows in the table.&lt;/p&gt;
&lt;p&gt;I have a button that adds a row to the table using the code above.&lt;/p&gt;
&lt;p&gt;If I select a dropdown in row 3 so that it&amp;#39;s background turns blue and then try to add another row the new row will get added after row 3, which had the dropdown selected.&lt;/p&gt;
&lt;p&gt;If I don&amp;#39;t select any row that the new row gets added to the bottom as expected.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;It just seams that the [last()] method does not work if a row is selected.&lt;/p&gt;</description></item><item><title>Re: [last()] method in Infopath 2010 Repeating Tables Not Working</title><link>https://www.infopathdev.com:443/forums/thread/69869.aspx</link><pubDate>Wed, 31 Aug 2011 07:02:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69869</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69869.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=69869</wfw:commentRss><description>&lt;p&gt;Could you clarify what you mean by &amp;quot;selected?&amp;quot;&amp;nbsp; I wouldn&amp;#39;t think anything like that would have any bearing on this code&amp;#39;s behavior.&lt;/p&gt;</description></item><item><title>Re: [last()] method in Infopath 2010 Repeating Tables Not Working</title><link>https://www.infopathdev.com:443/forums/thread/69868.aspx</link><pubDate>Wed, 31 Aug 2011 06:51:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69868</guid><dc:creator>nollaig</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69868.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=69868</wfw:commentRss><description>&lt;p&gt;Here is the piece of code I am using&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" 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="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:InternalSection/my:InternalFloorSection/my:InternalFloorGroup/my:group86/my:group87[last()]&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="#2b91af" size="2"&gt;&lt;font color="#2b91af" 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;group.InsertAfter(NewRow);&lt;/p&gt;
&lt;p&gt;If I have a table with 6 rows and the 3rd row is selected and I try to add a new row using this code it will put it after the 3rd row which is selected instead of after the 6th row.&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: [last()] method in Infopath 2010 Repeating Tables Not Working</title><link>https://www.infopathdev.com:443/forums/thread/69841.aspx</link><pubDate>Tue, 30 Aug 2011 19:27:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69841</guid><dc:creator>Karsten Brocksieper</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69841.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=69841</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I use the following code snippet to add a new row at the bottom of the table...&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;p&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNodeIterator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; currentItem = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.MainDataSource.CreateNavigator().Select(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;my:myFields/my:group1/my:group2&amp;quot;&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;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager);&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;for&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;int&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; counter = 0; counter &amp;lt; currentItem.Count; counter++, currentItem.MoveNext()) ;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;p&gt;            currentItem.Current.Clone().InsertAfter(currentItem.Current);&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Hope that helps,&lt;/p&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: [last()] method in Infopath 2010 Repeating Tables Not Working</title><link>https://www.infopathdev.com:443/forums/thread/69833.aspx</link><pubDate>Tue, 30 Aug 2011 17:21:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69833</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69833.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=69833</wfw:commentRss><description>&lt;p&gt;It would help if you&amp;#39;d show us what your code actually looks like.&lt;/p&gt;</description></item><item><title>[last()] method in Infopath 2010 Repeating Tables Not Working</title><link>https://www.infopathdev.com:443/forums/thread/69829.aspx</link><pubDate>Tue, 30 Aug 2011 16:45:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69829</guid><dc:creator>nollaig</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69829.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=69829</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have an Infopath 2010 form that run on the client.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have a repeating table that I am adding and removing rows using c#. Everything works fine except for the position of the added row. I am using the [last()] method to get the last row and then insert the new row after this using InsertAfter(newRow).&lt;/p&gt;
&lt;p&gt;The problem seems to be that the [last()] method is getting the row that is selected and then adding the new row after this.&lt;/p&gt;
&lt;p&gt;Can anyone tell me how to get a handle on the last row so I an add new rows after this so they appear on the bottom of the repeating table.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers.&lt;/p&gt;</description></item></channel></rss>