<?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: FormEvents_Loading HELP!!!</title><link>https://www.infopathdev.com:443/forums/thread/25976.aspx</link><pubDate>Mon, 28 Jan 2008 09:24:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25976</guid><dc:creator>omomani</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25976.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=25976</wfw:commentRss><description>&lt;p&gt;forgot to tell you that the code is in FormEvents_Loading event!! :)&lt;/p&gt;
&lt;p&gt;thanks again.&lt;/p&gt;</description></item><item><title>FormEvents_Loading HELP!!!</title><link>https://www.infopathdev.com:443/forums/thread/25975.aspx</link><pubDate>Mon, 28 Jan 2008 09:22:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25975</guid><dc:creator>omomani</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25975.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=25975</wfw:commentRss><description>&lt;p&gt;Hi all, i&amp;#39;m trying to switch my form view based on a given field&amp;#39;s value named &amp;quot;viewName&amp;quot;..... i wrote the following code :-&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dim MyNav As XPathNavigator MyNav = Me.MainDataSource.CreateNavigator() &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dim ViewValue As XPathNavigator = MyNav.SelectSingleNode(&amp;quot;/my:myFields/my:viewName&amp;quot;, Me.NamespaceManager)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;e.SetDefaultView(ViewValue.Value)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;but when i want to instantiate a form from this template i&amp;#39;m given the following error message:((&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The given key was not present in the dictionary. &lt;br /&gt;&lt;br /&gt;System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. &lt;br /&gt;at System.ThrowHelper.ThrowKeyNotFoundException() &lt;br /&gt;at System.Collections.Generic.Dictionary`2.get_Item(TKey key) &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.ViewInfoCollectionHost.&amp;lt;&amp;gt;c__DisplayClass4.&amp;lt;get_Item&amp;gt;b__3() &lt;br /&gt;at Microsoft.Office.InfoPath.Server.DocumentLifetime.OMExceptionManager.ExecuteOMCallWithExceptions(OMCall d, ExceptionFilter exceptionFilter)&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;&lt;strong&gt;An entry has been added to the Windows event log of the server. &lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;span class="ErrorPageEmphasisText"&gt;Log ID:&lt;/span&gt;&lt;span&gt;5337&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;can anyone help??&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;though, if i write&amp;nbsp;&lt;strong&gt;&amp;nbsp;e.SetDefaultView(&amp;quot;View 2&amp;quot;) &lt;/strong&gt;it works fine, ithink my problem is in getting the viewName field&amp;#39;s value!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;thanks.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Osama Momani.&lt;/span&gt;&lt;/div&gt;</description></item></channel></rss>