<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Problem with Form Load - View switch</title><link>https://www.infopathdev.com:443/forums/thread/38419.aspx</link><pubDate>Fri, 13 Feb 2009 20:22:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38419</guid><dc:creator>guptasourav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38419.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=38419</wfw:commentRss><description>&lt;p&gt;&lt;/p&gt;&lt;p&gt;Hi Henry,&lt;/p&gt;&lt;p&gt;&amp;nbsp;Hope this helps. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;String&amp;nbsp; queryStringValue = String.Empty;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;e.InputParameters.TryGetValue(&amp;quot;queryString&amp;quot;, out queryStringValue);&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Problem with Form Load - View switch</title><link>https://www.infopathdev.com:443/forums/thread/38418.aspx</link><pubDate>Fri, 13 Feb 2009 20:07:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38418</guid><dc:creator>Joohun</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38418.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=38418</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Your description is exactly what I am looking for before your problem - I need to switch the view after first user submit the form and second user will open in different view.&lt;/p&gt;
&lt;p&gt;Could you share your code snipet using QueryString?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks for your help,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Henry&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Problem with Form Load - View switch</title><link>https://www.infopathdev.com:443/forums/thread/36228.aspx</link><pubDate>Wed, 24 Dec 2008 04:28:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36228</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36228.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=36228</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;As per my knowledge it will not works using onLoad rules. You have to write the code for &lt;b&gt;ViewInfos &lt;/b&gt;in onload function.&lt;/p&gt;</description></item><item><title>Re: Problem with Form Load - View switch</title><link>https://www.infopathdev.com:443/forums/thread/36222.aspx</link><pubDate>Tue, 23 Dec 2008 23:16:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36222</guid><dc:creator>guptasourav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36222.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=36222</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Do anyone have any idea? I need to fix this asap.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Problem with Form Load - View switch</title><link>https://www.infopathdev.com:443/forums/thread/36106.aspx</link><pubDate>Fri, 19 Dec 2008 14:43:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36106</guid><dc:creator>guptasourav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36106.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=36106</wfw:commentRss><description>&lt;p&gt;Thanks Shiva ! &lt;br /&gt;&lt;/p&gt;&lt;p&gt;I am using Infopath 2007and &lt;b&gt;XDocument.ViewInfos[&amp;lt;viewName&amp;gt;].IsDefault = true &lt;/b&gt;works with 2003.&lt;/p&gt;&lt;p&gt;I am using&lt;b&gt; this.ViewInfos.Initial = this.&lt;/b&gt;&lt;b&gt;ViewInfos&lt;/b&gt;&lt;b&gt;[&amp;lt;viewName&amp;gt;]. &lt;/b&gt;It works fine if I do not have any rule in opening form. I have around 25 rules with 15 dataconnections in form opening rules. It is very tough to re-write all of them in code.&lt;/p&gt;&lt;p&gt;Even in &lt;b&gt;switchview &lt;/b&gt;does not work on form load.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Is there some other work around for it.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Problem with Form Load - View switch</title><link>https://www.infopathdev.com:443/forums/thread/36075.aspx</link><pubDate>Fri, 19 Dec 2008 08:01:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36075</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36075.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=36075</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;We can have switch view code in Form Load event and remove the rules for opening form. In Form Load event we have to specify the code to switch view like below,&lt;/p&gt;
&lt;p&gt;XDocument.ViewInfos[&amp;lt;viewName&amp;gt;].IsDefault = true&lt;/p&gt;
&lt;p&gt;If we use like this there is no conflict with rules and form load event code. &lt;/p&gt;</description></item><item><title>Re: Problem with Form Load - View switch</title><link>https://www.infopathdev.com:443/forums/thread/36072.aspx</link><pubDate>Fri, 19 Dec 2008 06:37:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36072</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36072.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=36072</wfw:commentRss><description>&lt;p&gt;You can change the view in code. Did you search the forum?&lt;/p&gt;</description></item><item><title>Problem with Form Load - View switch</title><link>https://www.infopathdev.com:443/forums/thread/36066.aspx</link><pubDate>Thu, 18 Dec 2008 22:29:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36066</guid><dc:creator>guptasourav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36066.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=36066</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I am creating a browser enabled form. I have 7 views and these views are dependent on some rules. At form options, I have written some&lt;b&gt; rules for opening forms&lt;/b&gt;.&lt;/p&gt;&lt;p&gt;Till here it worked fine. Now I want to open different views for editing form, from different web pages depending upon the user, roles etc. To achieve this I used QueryString appended to my url. Then set some rules to change or choose view while opening the form depending upon the querystring value. &lt;/p&gt;&lt;p&gt;As there is no way to get the querystring value in rules itself I had to write some code on FormLoad event. Fetch the querystring value and set the value to some field in the main datasource.&lt;/p&gt;&lt;p&gt;Now I can set some rules and change my views accordingly comparing the value from field of my datasource. &lt;b&gt;It works fine for Browser forms&lt;/b&gt;. But If I try to open it in client it does not.&lt;/p&gt;&lt;p&gt;This is strange but it seems that in browser forms first the &lt;b&gt;Form Load &lt;/b&gt;event executes then &lt;b&gt;rules for opening forms. &lt;/b&gt;While in client first the &lt;b&gt;rules for opening forms &lt;/b&gt;and then &lt;b&gt;Form Load &lt;/b&gt;event executes. Therefore my querystring value is not set and I cannot change the view(i.e rules for changing view are not applied).&lt;/p&gt;&lt;p&gt;&lt;b&gt;&amp;nbsp;Is there any other way to change the view at formload event.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Thanks &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>