<?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: Code execution from normal field</title><link>https://www.infopathdev.com:443/forums/thread/60651.aspx</link><pubDate>Mon, 25 Oct 2010 06:11:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60651</guid><dc:creator>Tuomo Ilonen2</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60651.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=60651</wfw:commentRss><description>&lt;p&gt;Thanks Patrick, Programming the fields seemed to be enough for my needs at this point.&lt;/p&gt;
&lt;p&gt;Still I have problem with secondary data fields. Once I retrieve&amp;nbsp;value to them, I wonder why this same value cannot be forwarded to main connection field instantly.&lt;/p&gt;
&lt;p&gt;I know I&amp;#39;m not much of a codewriter but this line I have in my code after the data has been retrieved to secondary connection:&lt;/p&gt;
&lt;p&gt;XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/d:fwdq_vend_main_info/@postal_code&amp;quot;).text = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/d:vwdq_cust_post_city_harmonized/@City&amp;quot;).text;&lt;/p&gt;
&lt;p&gt;So I have main connection field that is supposed to get value from the secondary connection field, but it doesn&amp;#39;t do it. I noticed this kind of problem already when trying to built this functionality with built-in rules.&lt;/p&gt;</description></item><item><title>Re: Code execution from normal field</title><link>https://www.infopathdev.com:443/forums/thread/60552.aspx</link><pubDate>Thu, 21 Oct 2010 07:10:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60552</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60552.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=60552</wfw:commentRss><description>&lt;p&gt;You can. You can use xdExtension::&amp;lt;procedure&amp;gt; to call code from a rule&amp;#39;s condition (Greg blogged this many years ago - please search for it). This let&amp;#39;s you mix rules with code. You can also just use code.&lt;/p&gt;
&lt;p&gt;To write just code (without the rules), add an OnAfterChange event by selecting Tools-&amp;gt;Programming and Changed Event (via IP2007 command menu)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Code execution from normal field</title><link>https://www.infopathdev.com:443/forums/thread/60512.aspx</link><pubDate>Wed, 20 Oct 2010 09:20:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60512</guid><dc:creator>Tuomo Ilonen2</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60512.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=60512</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I use coding behind buttons to get only one record from secondary data connection. But now I have too many button clicking in my form.&lt;/p&gt;
&lt;p&gt;Is it possible to write code behind normal field and execute this query immediately after leaving the field? I can have these in-built rules after field is filled why couldn&amp;#39;t I then havealso rules in the code.&lt;/p&gt;
&lt;p&gt;How I can do it?&lt;/p&gt;</description></item></channel></rss>