<?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>Views</title><link>https://www.infopathdev.com:443/forums/42.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/101964.aspx</link><pubDate>Wed, 01 Apr 2015 07:48:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:101964</guid><dc:creator>umashiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/101964.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=101964</wfw:commentRss><description>Hi Greg,

I have InfoPath 2010 form, which has many views... each view has many controls..
After submission of the form, If user change any value inside any views, i need to send an email notification saying that the value is changed...

Is there any way to achieve the above requirement?

Thanks..</description></item><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/50553.aspx</link><pubDate>Wed, 13 Jan 2010 10:28:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50553</guid><dc:creator>stukkend</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50553.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=50553</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi there,&lt;/p&gt;&lt;p&gt;&amp;nbsp;I know this might be extremely obvious to most of you, but for me as a newcomer to InfoPath Development i thought I&amp;#39;d just add the following, just as a matter of being pedantic about getting things right:&lt;/p&gt;&lt;p&gt;This code above works well in the Load event ( e.SetDefaultView(&amp;quot;viewName&amp;quot;) ), but if you are going to set the default view based on certain values, don&amp;#39;t forget to set the &amp;quot;main&amp;quot; default view for the form somewhere at the top of your code. &lt;/p&gt;&lt;p&gt;I dont know how better to explain this, so let me use an example:&lt;/p&gt;&lt;p&gt;//All your initialization happens here...&lt;/p&gt;&lt;p&gt;//Now we need to set the &amp;quot;main&amp;quot; default view...&lt;/p&gt;&lt;p&gt;e.SetDefaultView(&amp;quot;view1&amp;quot;); &lt;br /&gt;&lt;/p&gt;&lt;p&gt;//you have the condition for when the default view should change&lt;/p&gt;&lt;p&gt;if (somevalue)&lt;br /&gt;e.SetDefaultView(&amp;quot;view2&amp;quot;);&lt;/p&gt;&lt;p&gt;Remember that should you just set the default view without initializing it, the next time the form is opened, it will open &amp;quot;view2&amp;quot;, which was a bit unexpected for a beginner like me.&lt;/p&gt;&lt;p&gt;Thanks for this great site! &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/43103.aspx</link><pubDate>Wed, 17 Jun 2009 17:43:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43103</guid><dc:creator>rsoares</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43103.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=43103</wfw:commentRss><description>&lt;p&gt;Hi there &lt;/p&gt;
&lt;p&gt;Would you mind showing me a piece of code for it. I look forward to hearing from you. Many thanks&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Rodolfo&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/25970.aspx</link><pubDate>Sun, 27 Jan 2008 08:18:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25970</guid><dc:creator>omomani</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25970.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=25970</wfw:commentRss><description>&lt;p&gt;ok... thank you adamrhaarding for your reply?&lt;/p&gt;
&lt;p&gt;but i have a question and i wonder if anyone can help in that!!&lt;/p&gt;
&lt;p&gt;i want to apply the way you provided me (i.e. i will have a field named VIEW, its value will be the name of the view i want to render). after that in OnLoad event in infopath form i will make the form loaded in the view specified in VIEW field, and it will work) but my question is how can i change the value of VIEW fiedl????&lt;/p&gt;
&lt;p&gt;i can change the value each time i&amp;nbsp;save\submit the form to sharepoint, and&amp;nbsp;in the&amp;nbsp;next time the form to be rendered it will be rendered in the view i specified while saving (i.e.&amp;nbsp;the form is rendered in VIEW&amp;nbsp;1, i have filled it out, changed the value of VIEW filed to VIEW 2,&amp;nbsp;and then submit the form to share point) next time to render the form it will be rendered in VIEW&amp;nbsp;2, right?? ok i got this, but here i have a problem,&amp;nbsp;i need to&amp;nbsp;specify the view to be opened with in my ASPX Page Load event.. do u have a way to change the value of VIEW field in Page load event in ASP.net???? i appreciate any idea :)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks..&lt;/p&gt;
&lt;p&gt;Osama Momani.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/25964.aspx</link><pubDate>Sun, 27 Jan 2008 00:13:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25964</guid><dc:creator>adamrharding</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25964.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=25964</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;&lt;p&gt;This can be fairly simply achieved by making it conditional on a field value as to which view to open (as long as you are in InfoPath). So if WORKFLOW field = 1 then switch to view 1 if 2 to view 2 and so on.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I hope this helps&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/25855.aspx</link><pubDate>Wed, 23 Jan 2008 15:57:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25855</guid><dc:creator>omomani</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25855.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=25855</wfw:commentRss><description>&lt;p&gt;hello all, hello Mr. Greg :)&lt;/p&gt;
&lt;p&gt;i have a web page with a XmlFormView control rendering a form published in sharepoint!!!&lt;/p&gt;
&lt;p&gt;my XmlFormControl name is NewFormXmlFormView, how can i switch the view of my form before rendering in the page.&lt;/p&gt;
&lt;p&gt;on my ASPX page Load event what should i write to switch the view???&lt;/p&gt;
&lt;p&gt;i tried NewFormXmlFormView.SetDefaultView but SetDefaultView was not a part of NewFormXmlFormView!!!&lt;/p&gt;
&lt;p&gt;please, any ideas??? i will be grateful&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;Osama&lt;/p&gt;</description></item><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/11556.aspx</link><pubDate>Tue, 25 Jul 2006 18:13:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11556</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11556.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11556</wfw:commentRss><description>In IP07 (C#) you would use:&lt;br /&gt;&lt;br /&gt;ViewInfos.SwitchView("View Name"); // normal view switch&lt;br /&gt;e.SetDefaultView("View Name"); // set the default view during the Loading event&lt;br /&gt;&lt;br /&gt;You might be tempted to do the following, but it's not what you might think:&lt;br /&gt;&lt;br /&gt;ViewInfos.Initial = ViewInfos["View Name"]; // Set the default initial view in the XML PI to be opened the next time the form is loaded.&lt;br /&gt;</description></item><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/11555.aspx</link><pubDate>Mon, 24 Jul 2006 16:02:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11555</guid><dc:creator>mikesm</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11555.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11555</wfw:commentRss><description>This does work wonders in InfoPath 2003, but does not work with Infopath 2007 due to the object model change.&lt;br /&gt;Does anyone, including Greg, how to set the feault view in the onload event using InfoPath 2007?&lt;br /&gt;Thank you</description></item><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/11554.aspx</link><pubDate>Fri, 21 Jul 2006 23:02:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11554</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11554.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11554</wfw:commentRss><description>&amp;lt;blush/&amp;gt;</description></item><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/11553.aspx</link><pubDate>Fri, 21 Jul 2006 21:49:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11553</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11553.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11553</wfw:commentRss><description>I will have to agree that Greg Collins is quite a clever bloke!</description></item><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/11552.aspx</link><pubDate>Thu, 20 Jul 2006 09:42:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11552</guid><dc:creator>buki79</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11552.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11552</wfw:commentRss><description>Thanks :)</description></item><item><title>Re: switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/11551.aspx</link><pubDate>Thu, 20 Jul 2006 09:40:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11551</guid><dc:creator>Stavi</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11551.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11551</wfw:commentRss><description>That clever bloke Greg Collins has done a "how to" on switching views when form is opening&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/howto/tutorials/default.aspx?i=b5613773df374e42a0dddc22acb21d8e&gt;http://www.infopathdev.com/howto/tutorials/default.aspx?i=b5613773df374e42a0dddc22acb21d8e&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm not that great at code so i'll let you read it yourself</description></item><item><title>switchView won't switch</title><link>https://www.infopathdev.com:443/forums/thread/11482.aspx</link><pubDate>Thu, 20 Jul 2006 09:24:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11482</guid><dc:creator>buki79</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11482.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11482</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;stupid question, but why doesn't this work? The onload-Event is executed, but the view doesn't switch.&lt;br /&gt;&lt;br /&gt;[InfoPathEventHandler(EventType=InfoPathEventType.OnLoad)]&lt;br /&gt;public void OnLoad(DocReturnEvent e)&lt;br /&gt;{&lt;br /&gt;        thisXDocument.UI.Alert("onload works!!!");&lt;br /&gt;	// Write your code here.&lt;br /&gt;	if(!thisXDocument.IsNew)&lt;br /&gt;	{&lt;br /&gt;		thisXDocument.View.SwitchView("ReadOnly");&lt;br /&gt;	}			&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Thanks in advance.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Andi</description></item></channel></rss>