<?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: accessing last node of repeating section at run time</title><link>https://www.infopathdev.com:443/forums/thread/68004.aspx</link><pubDate>Sat, 02 Jul 2011 19:03:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68004</guid><dc:creator>DaveA</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68004.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=68004</wfw:commentRss><description>Could you give me the same in Jscript please?</description></item><item><title>Re: accessing last node of repeating section at run time</title><link>https://www.infopathdev.com:443/forums/thread/42374.aspx</link><pubDate>Tue, 02 Jun 2009 06:19:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42374</guid><dc:creator>onjus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42374.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=42374</wfw:commentRss><description>&lt;p&gt;Thanks jimmy for help&amp;nbsp;, i will take care from next time onwards ;-)&lt;/p&gt;</description></item><item><title>Re: accessing last node of repeating section at run time</title><link>https://www.infopathdev.com:443/forums/thread/42360.aspx</link><pubDate>Mon, 01 Jun 2009 15:18:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42360</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42360.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=42360</wfw:commentRss><description>&lt;p&gt;Please don&amp;#39;t post the same question in multiple forums.&lt;/p&gt;
&lt;p&gt;You can use simple XPath selection to get the last node of any repeating section, so for example if I wanted to access field1 in the last group2 group (and group2 is repeating) I would use in C#:&lt;/p&gt;
&lt;p&gt;XPathNavigator lastField1 = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/my:myFields/my:group1/my:group2[&lt;strong&gt;&lt;u&gt;last()&lt;/u&gt;&lt;/strong&gt;]/my:field1&amp;quot;, NamespaceManager);&lt;/p&gt;</description></item><item><title>accessing last node of repeating section at run time</title><link>https://www.infopathdev.com:443/forums/thread/42357.aspx</link><pubDate>Mon, 01 Jun 2009 14:32:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42357</guid><dc:creator>onjus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42357.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=42357</wfw:commentRss><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;i have certain problem of accessing last node of repeating section at run time. plz see below stucture for clarity&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- RepeatingSection&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&amp;nbsp; field1&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&amp;nbsp; field2&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&amp;nbsp; field3&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;At run time there are 20 copies of my rereating section made.my problem is to access field1 in 20th repeating section in code.it can be done in infopath2003 using indexer.but i want to know how it can be done in infopath2007 ?&lt;/p&gt;
&lt;p&gt;Thanks for help in Advance &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>