<?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: ViewInfos.SwitchView getting view name from field</title><link>https://www.infopathdev.com:443/forums/thread/84623.aspx</link><pubDate>Wed, 21 Nov 2012 16:13:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84623</guid><dc:creator>Sander0123</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84623.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=84623</wfw:commentRss><description>&lt;p&gt;Thanks you very much. It&amp;#39;s working perfectly.&lt;/p&gt;</description></item><item><title>Re: ViewInfos.SwitchView getting view name from field</title><link>https://www.infopathdev.com:443/forums/thread/84616.aspx</link><pubDate>Wed, 21 Nov 2012 15:36:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84616</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84616.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=84616</wfw:commentRss><description>&lt;p&gt;That&amp;#39;s because I&amp;#39;m silly and forgot something.&lt;/p&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; viewName = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:GoToView&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).&lt;strong&gt;Value&lt;/strong&gt;;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: ViewInfos.SwitchView getting view name from field</title><link>https://www.infopathdev.com:443/forums/thread/84613.aspx</link><pubDate>Wed, 21 Nov 2012 15:26:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84613</guid><dc:creator>Sander0123</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84613.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=84613</wfw:commentRss><description>&lt;p&gt;Thanks, this will help me in the right direction.&lt;/p&gt;
&lt;p&gt;Unfortunately it is giving me tthis error: Error&amp;nbsp;1&amp;nbsp;Cannot implicitly convert type &amp;#39;System.Xml.XPath.XPathNavigator&amp;#39; to &amp;#39;string&amp;#39;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My code does now looks like this:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; CTRL14_5_Clicked(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;ClickedEventArgs&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; viewName = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:GoToView&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;ViewInfos.SwitchView(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;viewName&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: ViewInfos.SwitchView getting view name from field</title><link>https://www.infopathdev.com:443/forums/thread/84610.aspx</link><pubDate>Wed, 21 Nov 2012 14:54:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84610</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84610.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=84610</wfw:commentRss><description>&lt;p&gt;You&amp;#39;ll need to get the value from the field - C# would be (with your XPath to your node replacing the bold text, of course):&lt;/p&gt;&lt;p&gt;string viewName = MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;&lt;strong&gt;XPATH TO NODE GOES HERE&lt;/strong&gt;&amp;quot;, NamespaceManager);&lt;/p&gt;&lt;p&gt;Then you can use the variable in place of &amp;quot;PMI&amp;quot;&lt;/p&gt;&lt;p&gt;ViewInfos.SwitchView(viewName);&lt;/p&gt;</description></item><item><title>ViewInfos.SwitchView getting view name from field</title><link>https://www.infopathdev.com:443/forums/thread/84604.aspx</link><pubDate>Wed, 21 Nov 2012 10:24:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:84604</guid><dc:creator>Sander0123</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/84604.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=84604</wfw:commentRss><description>&lt;p&gt;Using Infopath 2010, browser enabled form on Sharepoint 2010, coding is in VB.&lt;/p&gt;
&lt;p&gt;I created a field called GoToView that get&amp;#39;s the name of a view based on a Sharepoint list with a filter based on two drop down boxes. To verify the result I temporary show the content of this field in a text box. This works perfectly. &lt;/p&gt;
&lt;p&gt;I created a button to switch views. I know this can be done with a action rule but I think I cannot pass on the value from GoToView into one of the rules to determine the correct view. &lt;/p&gt;
&lt;p&gt;I&amp;#39;ve used this code to test the button witch works fine. &lt;/p&gt;
&lt;p&gt;&amp;nbsp; Public Sub CTRL14_5_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.ViewInfos.SwitchView(&amp;quot;PMI&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/p&gt;
&lt;p&gt;My questions is: how can I replace &amp;quot;PMI&amp;quot; with the dynamic content of the GoToView field?&lt;/p&gt;</description></item></channel></rss>