<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: what comes first?</title><link>https://www.infopathdev.com:443/forums/thread/45470.aspx</link><pubDate>Wed, 05 Aug 2009 19:46:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45470</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45470.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45470</wfw:commentRss><description>&lt;p&gt;Hi--&lt;/p&gt;
&lt;p&gt;According to Patrick Halstead&amp;#39;s &lt;strong&gt;&lt;em&gt;&lt;u&gt;Developing Solutions with Microsoft InfoPath&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The order of processing at startup of a form is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;User roles&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Open rules&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;OnLoad event handler&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;OnSwitchView event handler&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/blockquote&gt;
&lt;p&gt;From page 322. Now, that was written for 2003, so browser forms weren&amp;#39;t in play, but I&amp;#39;d imaging the processing order is still the same. It should be simple enough to test -- you could add a rule in your open rules to set a fields value, then add a line of code in your loading event to set the same field to a different value -- publish and open your form and see what value you get....&lt;/p&gt;</description></item><item><title>what comes first?</title><link>https://www.infopathdev.com:443/forums/thread/45319.aspx</link><pubDate>Mon, 03 Aug 2009 12:25:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:45319</guid><dc:creator>yuvalgo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/45319.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=45319</wfw:commentRss><description>&lt;p&gt;hello all,&lt;br /&gt;I&amp;nbsp;have a browser enabled form published to form server.&lt;br /&gt;in the form tamplate i have some lines of code on the form_&lt;font size="2"&gt;Loading event&lt;br /&gt;I&amp;nbsp;also&amp;nbsp;have some rules when the form is opening.&lt;br /&gt;my question is what comes first?&lt;br /&gt;&lt;/font&gt;is it the code or the rules? and can i decide the order&amp;nbsp;myself ?&lt;br /&gt;thanx in advanced..&lt;/p&gt;
&lt;p&gt;Yuval.&lt;font size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;</description></item></channel></rss>