<?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: Do Form Load rules run before the FormEvents_Loading code?</title><link>https://www.infopathdev.com:443/forums/thread/68818.aspx</link><pubDate>Thu, 28 Jul 2011 18:50:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68818</guid><dc:creator>Abhishek Das</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68818.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=68818</wfw:commentRss><description>&lt;p&gt;Yes Form Load rules run before form event loading code. In the code you can write if the value of the input parameter then execute the query data connection.&lt;/p&gt;</description></item><item><title>Do Form Load rules run before the FormEvents_Loading code?</title><link>https://www.infopathdev.com:443/forums/thread/68816.aspx</link><pubDate>Thu, 28 Jul 2011 18:26:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:68816</guid><dc:creator>mikeyfev1</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/68816.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=68816</wfw:commentRss><description>&lt;p&gt;I have an InfoPath 2010&amp;nbsp;form that needs to perform a Sharepoint 2010 list&amp;nbsp;query based on the value of an input parameter.&amp;nbsp; I get the input parameter value with a small chunk of C# code in the &lt;font size="2"&gt;&lt;strong&gt;FormEvents_Loading&lt;/strong&gt; function.&amp;nbsp; This code works fine and has been tested to acquire the correct value.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;When I add a &lt;strong&gt;Form Load&lt;/strong&gt; rule that attempts to perform the Sharepoint list query using the input parameter value, the lookup always fails.&amp;nbsp; It appears that this happens because at the time of the &lt;strong&gt;Form Load&lt;/strong&gt; rule execution the &lt;strong&gt;FormEvents_Loading&lt;/strong&gt; code has not yet executed.&amp;nbsp; Is this correct; the &lt;strong&gt;Form Load&lt;/strong&gt; rules run before the &lt;strong&gt;FormEvents_Loading&lt;/strong&gt; code?&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;How can I solve this chicken-before-the-egg problem?&amp;nbsp; I really don&amp;#39;t want to embed the Sharepoint list query in code because this form will be used in many other sites.&amp;nbsp; As I understand it, in order to&amp;nbsp;perform Sharepoint&amp;nbsp;list queries from InfoPath in code I have to embed some site and list-specific values (site path, list GUID, etc).&amp;nbsp; How can that be a portable solution?&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;TIA.&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>