<?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: navigating xPath in field changed event using C#</title><link>https://www.infopathdev.com:443/forums/thread/80242.aspx</link><pubDate>Thu, 05 Jul 2012 17:41:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80242</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80242.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=80242</wfw:commentRss><description>&lt;p&gt;Since this is a node outside any repeating group, I&amp;#39;d probably just use:&lt;/p&gt;
&lt;p&gt;this.MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/my:myFields/my:Debug&amp;quot;, NamespaceManager).SetValue(author);&lt;/p&gt;</description></item><item><title>navigating xPath in field changed event using C#</title><link>https://www.infopathdev.com:443/forums/thread/80227.aspx</link><pubDate>Thu, 05 Jul 2012 13:09:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:80227</guid><dc:creator>Paradiddle</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/80227.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=80227</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m using InfoPath 2007 to create a browser form.&amp;nbsp; In the form I have a Contact Selector.&amp;nbsp; When it changes I want to get the value of the AccountID and set another field and run additional code. The xpath of the Contact Selector node&amp;nbsp;that my changed event is triggered from&amp;nbsp;is:&lt;/p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;p&gt;/my:myFields/my:gpAuthor/my:gpContactSelector/my:Person/my:AccountId&lt;/p&gt;&lt;p&gt;&amp;nbsp;I&amp;#39;d like to set this field:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;/my:myFields/my:Debug&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;To get the current fields value I&amp;#39;m using:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;font size="2"&gt;&lt;p&gt; String author = e.Site.Value;&lt;/p&gt;&lt;p&gt;I&amp;#39;ve tried the following to set Debugs value but none of them seem to work:&lt;/p&gt;&lt;p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;1. e.Site.SelectSingleNode(&amp;quot;/my:myFields/my:Debug&amp;quot;, NamespaceManager).SetValue(author)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;p&gt;2. &lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;e.Site.MoveToRoot();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;e.Site.SelectSingleNode(&amp;quot;/my:myFields/my:Debug&amp;quot;, NamespaceManager).SetValue(author);&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;3. &lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;e.Site.SelectSingleNode(&amp;quot;../../my:Debug&amp;quot;, NamespaceManager).SetValue(author);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;4. &lt;font size="2"&gt;e.Site.SelectSingleNode(&amp;quot;../.&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;./../my:Debug&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;author&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;p&gt;5. &lt;font size="2"&gt;e.Site.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;../../../../my:Debug&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(author&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;p&gt;6. &lt;font size="2"&gt;e.Site.SelectSingleNode(&amp;quot;,,/,,/,,/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;../../my:Debug&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).SetValue(author&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;p&gt;How is this supposed to be done?&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;&amp;nbsp;Dave&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description></item></channel></rss>