<?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: How to switch to data entry view and populate based on a parameter?</title><link>https://www.infopathdev.com:443/forums/thread/42733.aspx</link><pubDate>Wed, 10 Jun 2009 21:08:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42733</guid><dc:creator>kminor</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42733.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=42733</wfw:commentRss><description>&lt;p&gt;After much swearing, I found a way to do this.&amp;nbsp; I&amp;#39;m sure it&amp;#39;s not the most efficient way to do it, but it works.&lt;/p&gt;
&lt;p&gt;I have a view that displays detail records for submitted requests in a repeating table, and each row/record has a small button in the left-most column.&amp;nbsp; I added a query field for my Request ID (the primary key for each of my forms) beneath the table and set its width = 0 px (don&amp;#39;t need to/want to see it).&amp;nbsp; The Request ID is also displayed in my repeating table.&lt;/p&gt;
&lt;p&gt;In the onClick for each row&amp;#39;s button, I set the value of the Request ID query field = the Request ID for that row:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;XDocument.DOM.selectSingleNode(&amp;quot;//dfs:queryFields/q:Requests/@RequestID&amp;quot;).text = _ eventObj.Source.selectSingleNode(&amp;quot;@RequestID&amp;quot;).text&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Still in the onClick, I switch views to my data entry screen:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;XDocument.View.SwitchView(&amp;quot;Submit Request&amp;quot;)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;---------------------------------------------&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Now, on that hidden query textbox, I added a rule that says if it&amp;#39;s not blank, submit to my main data connection.&lt;/p&gt;
&lt;p&gt;That more or less accomplished what I was trying to accomplish -- the end result is that I&amp;#39;m taken to my data entry view, and it&amp;#39;s pre-populated with the information from the request.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I still have a problem, though -- &lt;/strong&gt;the data from the other table in my main data connection still isn&amp;#39;t coming in.&amp;nbsp; Argh!&amp;nbsp; Hilary had suggested some things on an old thread of mine.&amp;nbsp; Off to review her suggestions again...&lt;/p&gt;</description></item><item><title>Re: How to switch to data entry view and populate based on a parameter?</title><link>https://www.infopathdev.com:443/forums/thread/42701.aspx</link><pubDate>Wed, 10 Jun 2009 14:01:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42701</guid><dc:creator>kminor</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42701.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=42701</wfw:commentRss><description>&lt;p&gt;Does anyone know how to do this, if it can even be done?&amp;nbsp; Thanks in advance for any help!&lt;/p&gt;</description></item><item><title>How to switch to data entry view and populate based on a parameter?</title><link>https://www.infopathdev.com:443/forums/thread/42582.aspx</link><pubDate>Mon, 08 Jun 2009 04:08:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42582</guid><dc:creator>kminor</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42582.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=42582</wfw:commentRss><description>&lt;p&gt;Hello, I could use some help, please.&lt;/p&gt;
&lt;p&gt;I have a view that displays records from a secondary data source in a repeating table.&amp;nbsp; I added a button that is displayed on each row of the repeating table and set them to&amp;nbsp;run custom code.&amp;nbsp; I&amp;#39;ve hobbled together some code to get the unique identifier of that row&amp;#39;s record (ex:&amp;nbsp; 56).&lt;/p&gt;
&lt;p&gt;When the user presses one of the buttons, I would like to switch to my data entry view and have that row&amp;#39;s&amp;nbsp;record already pulled up from the main data connection (both include this particular ID field).&amp;nbsp; How can I do this in code (VB Script)?&amp;nbsp; It seems like there must be a way to tell the data entry view to open and pull up the data for ID# 56.&lt;/p&gt;
&lt;p&gt;Thanks for any and all help!&lt;/p&gt;
&lt;p&gt;ETA -- I&amp;#39;m using InfoPath 2003...&lt;/p&gt;</description></item></channel></rss>