<?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>InfoPath programmatic inserting a row at the end of a repeating table with values from another data source</title><link>https://www.infopathdev.com:443/forums/thread/96203.aspx</link><pubDate>Fri, 28 Feb 2014 18:21:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:96203</guid><dc:creator>aaronthompson528</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/96203.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=96203</wfw:commentRss><description>I already have a repeating table programmatic populating from a secondary data source that has been submitted to a database and now I need a query data source to bring additional values and add them at the end of the repeating table. This is my code:

private void UpdateNewQueryField(XPathNavigator queryNavigation, XPathNavigator domNavigator, string xPath, string queryFieldXPath)
        {
            //Get iterator oject
            XPathNodeIterator group = domNavigator.Select(&amp;quot;/my:Year2PreferredMedications/my:LocationsGroup/my:LocationsSubGroup&amp;quot;, NamespaceManager);

            //loop to move to last row
            for (int counter = 0; counter</description></item></channel></rss>