<?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: Displaying a view on Form Load in browser</title><link>https://www.infopathdev.com:443/forums/thread/77551.aspx</link><pubDate>Fri, 13 Apr 2012 05:57:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77551</guid><dc:creator>Jo-Anne Alfafara</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77551.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=77551</wfw:commentRss><description>&lt;p&gt;Hello again,&lt;/p&gt;&lt;p&gt;Why don&amp;#39;t you try adding a rule on form load that switches to &amp;quot;View 2&amp;quot; and add a condition so that it only runs when status = &amp;quot;&amp;lt;your value&amp;gt;&amp;quot;?&lt;/p&gt;</description></item><item><title>Re: Displaying a view on Form Load in browser</title><link>https://www.infopathdev.com:443/forums/thread/77439.aspx</link><pubDate>Wed, 11 Apr 2012 12:49:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77439</guid><dc:creator>yelanger</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77439.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=77439</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thanks Jo-Anne,&lt;/p&gt;&lt;p&gt;&amp;nbsp;I need to use code for this as I have several views.&amp;nbsp; The view that opens is determined by a web service that brings back a SQL record that contains a status.&lt;/p&gt;&lt;p&gt;&amp;nbsp;My problem is the Rules run before the code on load so I can&amp;#39;t use the rules as my code has not yet determined the status.&amp;nbsp; The code I use does work fine in the InfoPath UI but just not the browser. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Displaying a view on Form Load in browser</title><link>https://www.infopathdev.com:443/forums/thread/77419.aspx</link><pubDate>Wed, 11 Apr 2012 03:42:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77419</guid><dc:creator>Jo-Anne Alfafara</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77419.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=77419</wfw:commentRss><description>&lt;p&gt;Hi yelanger,&lt;/p&gt;&lt;p&gt;You can set the default view without code. Try editing the properties of the view and check the &amp;quot;set as default view&amp;quot; check box.&lt;/p&gt;&lt;p&gt;Jo-Anne&lt;/p&gt;</description></item><item><title>Displaying a view on Form Load in browser</title><link>https://www.infopathdev.com:443/forums/thread/77327.aspx</link><pubDate>Mon, 09 Apr 2012 21:05:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77327</guid><dc:creator>yelanger</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77327.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=77327</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt; I&amp;#39;m trying to display a view when I open my form but the following code only work in the InfoPath UI and not in the web browser.&amp;nbsp; Any suggestions would be greatly appreciated.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I&amp;#39;m running this code in &amp;quot;FormEvents_Loading&amp;quot; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;e.SetDefaultView(&amp;quot;View 2&amp;quot;) &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks in advance &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>