<?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: Implementing First, Previous, Next and Last functi</title><link>https://www.infopathdev.com:443/forums/thread/13266.aspx</link><pubDate>Tue, 21 Jun 2005 23:15:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13266</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13266.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13266</wfw:commentRss><description>For the first page, you would have your button in the repeating table and do the following:&lt;br /&gt;&lt;br /&gt;Create a simple .xml file such as the following:&lt;br /&gt;&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;FormData&amp;gt;&lt;br /&gt;    &amp;lt;SelectedRow&amp;gt;&amp;lt;/SelectedRow&amp;gt;&lt;br /&gt;&amp;lt;/FormData&amp;gt;&lt;/pre&gt;and save it as &lt;b&gt;FormData.xml&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Then, in the InfoPath designer:&lt;br /&gt;&lt;br /&gt;1. Select Data Connections from the Tools menu, and then click Add.&lt;br /&gt;2. Add the FormData.xml file as a Receive connection.&lt;br /&gt;In your button's rules, set the value of SelectedRow field using an XPath similar to the following:&lt;pre&gt;SelectedRow = count(preceding-sibling::my:RepeatingGroup)+1&lt;/pre&gt;In your other view, filter the repeating section based on:&lt;pre&gt;position() = SelectedRow&lt;/pre&gt;Then setup your other navigation buttons to increment/decrement SelectedRow.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]&lt;br /&gt;InfoPath Dev</description></item><item><title>Re: Implementing First, Previous, Next and Last functi</title><link>https://www.infopathdev.com:443/forums/thread/13265.aspx</link><pubDate>Mon, 20 Jun 2005 16:21:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13265</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13265.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13265</wfw:commentRss><description>Hi kfrost, &lt;br /&gt;Navigating using |&amp;lt;&amp;lt; &amp;lt; &amp;gt; &amp;gt;&amp;gt;| buttons is possible with the code. It is also possible with the conditional formatting/Rules but your InfoPath solution will become slow if you perform many operations in the UI.&lt;br /&gt;&lt;br /&gt;So it is better for you to use code. If you use code you need to maintain two data connections one to store and other to for UI display purposes.&lt;br /&gt;&lt;br /&gt;Hope this helps!&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPathDev India</description></item><item><title>Implementing First, Previous, Next and Last functi</title><link>https://www.infopathdev.com:443/forums/thread/12467.aspx</link><pubDate>Wed, 15 Jun 2005 20:56:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12467</guid><dc:creator>kfrost</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12467.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12467</wfw:commentRss><description>I've got a form with several forms.  2 in particular that I'm trying to work with right now.&lt;br /&gt;&lt;br /&gt;The main view has a repeating table which is bound to a secondary data connection.  It connects to a database and brings in a table called Trips. &lt;br /&gt;&lt;br /&gt;I have a button column on the left of the table so if a user wants to see more details about the trip, they click it which brings up more details about the trip in a view called Trip Details.&lt;br /&gt;&lt;br /&gt;I do this by creating a Rule called TripDetails and add 3 actions&lt;br /&gt;1) Set a fields value.  I take the Main data connections Query/datafield/TripID as the field and then for the value you use the TripID from the secondary source that populates the table&lt;br /&gt;2) Query Using a data Connection, here I use the Primary SQL connection&lt;br /&gt;3) Swithc to View: Trip Details&lt;br /&gt;&lt;br /&gt;All of this works great.  But I'd like to add |&amp;lt; &amp;lt;&amp;lt; &amp;gt;&amp;gt; &amp;gt;| functionality to be able to move through the records while in the Trip Detail view.&lt;br /&gt;&lt;br /&gt;To do this I assume I'm going to have to use the sibling features but I don't know how to programmatically.  if anybody has a sample I would appreciate it.&lt;br /&gt;&lt;br /&gt;Additionally, it appears that I should be able to do this using a rule.  The best I can tell if I could figure out the appropriate XPATH syntax I could just create the buttons and add rules and the appropriate actions to move through the records.  &lt;br /&gt;&lt;br /&gt;I'm trying to set a Set Field value and I'm setting the Field to Query/datafield/TripID and now I'm trying to set the value.  Here's what it defaults to:&lt;br /&gt;xdXDocument:GetDOM("TripDetails")/dfs:myFields/dfs:dataFields/d:Trips/@TripID&lt;br /&gt;&lt;br /&gt;What I'm thinking is I need to figure out how use the preceeding::sibling, Next, Last() etc to get the preceeding or next values.  Anybody know how I can modify the xpath statement above to get the TripID value in the previous or next record?&lt;br /&gt;&lt;br /&gt;Thanks.&lt;br /&gt;&lt;br /&gt;kris&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>