<?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: Switching View only works once</title><link>https://www.infopathdev.com:443/forums/thread/11604.aspx</link><pubDate>Sun, 26 Nov 2006 22:52:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11604</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11604.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11604</wfw:commentRss><description>Agni - could you explain more on it please (if possible with an example). Thanks</description></item><item><title>Re: Switching View only works once</title><link>https://www.infopathdev.com:443/forums/thread/11603.aspx</link><pubDate>Fri, 24 Nov 2006 20:16:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11603</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11603.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11603</wfw:commentRss><description>Hi Soham,&lt;br /&gt;Instead of maintaining three fields for each state, you should have one field which contains the state of the form and you can switch the view based on the this variable. This will reduce the size of the XML(even though very small but good practice) and no confusion when using the field.</description></item><item><title>Re: Switching View only works once</title><link>https://www.infopathdev.com:443/forums/thread/11602.aspx</link><pubDate>Fri, 24 Nov 2006 16:09:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11602</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11602.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11602</wfw:commentRss><description>Hi Soham Bhatt,&lt;br /&gt;&lt;br /&gt;Glad to hear you figured it out and thanks for posting your answer here.</description></item><item><title>Re: Switching View only works once</title><link>https://www.infopathdev.com:443/forums/thread/11601.aspx</link><pubDate>Fri, 24 Nov 2006 03:31:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11601</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11601.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11601</wfw:commentRss><description>I figured out the problem associated for not switching to the last view. &lt;br /&gt;&lt;br /&gt;1. When a button was clicked in any view it makes the "view" condition True.&lt;br /&gt;&lt;br /&gt;for example: If i'm submitting the form - on click i make the value of submit to true. for Approve - approve is true, etc&lt;br /&gt;&lt;br /&gt;2. On Form Options (Open and Save) i was checking if the value of submit is true and it wil swtcih the view (all good at this point) but this will work only one time and if the form is denied and re-submitted - it wasnt applying the rules properly and showing teh correct view. This is because all teh condition is checked and all the values (Submit, approve,deny) is true.&lt;br /&gt;&lt;br /&gt;Solultion: I just had to make everything else false on the above options and then swtcih the view.&lt;br /&gt;&lt;br /&gt;It now loops as many times as required.&lt;br /&gt;&lt;br /&gt;Thanks you all for your inputs</description></item><item><title>Re: Switching View only works once</title><link>https://www.infopathdev.com:443/forums/thread/11600.aspx</link><pubDate>Tue, 14 Nov 2006 18:40:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11600</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11600.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11600</wfw:commentRss><description>Hi Soham Bhatt,&lt;br /&gt;&lt;br /&gt;That works too! Glad to hear you got it working for new form. &lt;br /&gt;Can you check once your Rule condition is correct or not. One more are you need to check view name is exact match to “Deny” view name. &lt;br /&gt;Can you try to put same Rule one more time to old form then it works or not.</description></item><item><title>Re: Switching View only works once</title><link>https://www.infopathdev.com:443/forums/thread/11599.aspx</link><pubDate>Mon, 13 Nov 2006 03:26:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11599</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11599.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11599</wfw:commentRss><description>Thanks Shiva - but i want the solution using rules. Seems that if i make the new form with the same concept then all works fine. May the old form had something in it from stopping it to switch from Approve to Deny.</description></item><item><title>Re: Switching View only works once</title><link>https://www.infopathdev.com:443/forums/thread/11598.aspx</link><pubDate>Fri, 10 Nov 2006 06:34:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11598</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11598.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11598</wfw:commentRss><description>Hi Soham Bhatt,&lt;br /&gt;&lt;br /&gt;You can write code for button to switching to another view.&lt;br /&gt;&lt;br /&gt;btnSwitchView_OnClick(DocActionEvent e)&lt;br /&gt;{&lt;br /&gt;	String viewName = thisXDocument.View.Name;&lt;br /&gt;	if(viewName == “Request”)&lt;br /&gt;	{&lt;br /&gt;		SwitchView(“Approve”);&lt;br /&gt;	}&lt;br /&gt;	else If(viewName == “Approve”)&lt;br /&gt;	{&lt;br /&gt;		SwitchView(“Request”);&lt;br /&gt;	}&lt;br /&gt;	else If(viewName == “Denied”)&lt;br /&gt;	{&lt;br /&gt;		SwitchView(“Request”);&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;private void SwitchView(string viewName)&lt;br /&gt;	{&lt;br /&gt;	if(thisXDocument.View != null)&lt;br /&gt;		thisXDocument.View.SwitchView(viewName);&lt;br /&gt;	else&lt;br /&gt;		thisXDocument.ViewInfos[viewName].IsDefault =true;&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;By using above code you can switch view where do you want and when do you want to switch the view depends on your condition. As per your requirement you can change the condition.&lt;br /&gt;&lt;br /&gt;Note: Above code in C#.</description></item><item><title>Re: Switching View only works once</title><link>https://www.infopathdev.com:443/forums/thread/11597.aspx</link><pubDate>Fri, 10 Nov 2006 06:11:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11597</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11597.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11597</wfw:commentRss><description>If you do it from Button Properties then it changes the View then and there - But a normal user shouldnt have that authority to change the views. The data gets submitted to user a Data Connection (emailing to the Line Manager). And when Line Manager opens the Form the view is changed to Approve.</description></item><item><title>Re: Switching View only works once</title><link>https://www.infopathdev.com:443/forums/thread/11596.aspx</link><pubDate>Fri, 10 Nov 2006 06:07:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11596</guid><dc:creator>Mahitha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11596.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11596</wfw:commentRss><description>Instead of this you can use rules on each and every button. &lt;br /&gt;Button Properties--&amp;gt;Rules--&amp;gt;Add--&amp;gt;Add Action--&amp;gt;Switch views&lt;br /&gt;&lt;br /&gt;Hope this Helps.&lt;br /&gt;</description></item><item><title>Switching View only works once</title><link>https://www.infopathdev.com:443/forums/thread/11497.aspx</link><pubDate>Fri, 10 Nov 2006 04:42:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11497</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11497.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=11497</wfw:commentRss><description>i'm creating a new request form with 3 views (Request, Approve, Denied) where a user fills in the required information and submits to the line manager (Request view). Line manager have a different view (Approve) which he can approve or decline the form. On approving it sends and email out to the designated person inchange of providing the service. All works fine till here. But the next step is where if a line manager declines - it sends an email back to the user to submitted the form with the Denied view or Request view (both having the same submit button). For this case it doesnt swtich the view.&lt;br /&gt;&lt;br /&gt;I'm currently switching the views in Tools -&amp;gt; Form Options -&amp;gt; Open and save</description></item></channel></rss>