<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Set Value depending on View</title><link>https://www.infopathdev.com:443/forums/thread/8633.aspx</link><pubDate>Thu, 22 Dec 2005 22:37:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8633</guid><dc:creator>jeanpaul</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8633.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8633</wfw:commentRss><description>Sorry it is working know...I just had the node value spelled wrong</description></item><item><title>Re: Set Value depending on View</title><link>https://www.infopathdev.com:443/forums/thread/8632.aspx</link><pubDate>Thu, 22 Dec 2005 22:23:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8632</guid><dc:creator>jeanpaul</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8632.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8632</wfw:commentRss><description>One more thing...the node is in a repeating element</description></item><item><title>Re: Set Value depending on View</title><link>https://www.infopathdev.com:443/forums/thread/8631.aspx</link><pubDate>Thu, 22 Dec 2005 22:06:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8631</guid><dc:creator>jeanpaul</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8631.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8631</wfw:commentRss><description>OK i did the following on switch view:&lt;br /&gt;&lt;br /&gt;    If thisXDocument.View.Name = "SUFFOLK" Then&lt;br /&gt;                thisXDocument.DOM.selectSingleNode("//mstns:LisPendants/mstns:lisPendantslist/mstns:VIEW").text = "SUFFOLK"&lt;br /&gt;            End If&lt;br /&gt;&lt;br /&gt;BUT I am getting the following error:&lt;br /&gt;&lt;br /&gt;System.NullReferenceException&lt;br /&gt;Object reference not set to an instance of an object.&lt;br /&gt;   at LisPendants.LisPendants.OnSwitchView(DocEvent e) in S:\INFOPATH FORMS\LisPendants\FormCode.vb:line 61&lt;br /&gt;   at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnSwitchView(DocEvent pEvent)&lt;br /&gt;</description></item><item><title>Re: Set Value depending on View</title><link>https://www.infopathdev.com:443/forums/thread/8630.aspx</link><pubDate>Thu, 22 Dec 2005 21:43:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8630</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8630.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8630</wfw:commentRss><description>Use the OnSwitchView event.&lt;br /&gt;&lt;br /&gt;Then you can do the code below in the event.&lt;br /&gt;&lt;br /&gt;if (XDocument.View.Name == "XXX")&lt;br /&gt;{&lt;br /&gt;	//do something&lt;br /&gt;}&lt;br /&gt;</description></item><item><title>Set Value depending on View</title><link>https://www.infopathdev.com:443/forums/thread/5223.aspx</link><pubDate>Thu, 22 Dec 2005 16:32:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5223</guid><dc:creator>jeanpaul</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5223.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5223</wfw:commentRss><description>I would like to set a value of a field depending on the current view..&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;if current view = "ABC"&lt;br /&gt;&lt;br /&gt;Then [field] = 5</description></item></channel></rss>