Do Form Load rules run before the FormEvents_Loading code? - InfoPath Dev
in

InfoPath Dev

Do Form Load rules run before the FormEvents_Loading code?

Last post 07-28-2011 11:50 AM by Abhishek Das. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-28-2011 11:26 AM

    Do Form Load rules run before the FormEvents_Loading code?

    I have an InfoPath 2010 form that needs to perform a Sharepoint 2010 list query based on the value of an input parameter.  I get the input parameter value with a small chunk of C# code in the FormEvents_Loading function.  This code works fine and has been tested to acquire the correct value.

    When I add a Form Load rule that attempts to perform the Sharepoint list query using the input parameter value, the lookup always fails.  It appears that this happens because at the time of the Form Load rule execution the FormEvents_Loading code has not yet executed.  Is this correct; the Form Load rules run before the FormEvents_Loading code?

    How can I solve this chicken-before-the-egg problem?  I really don't want to embed the Sharepoint list query in code because this form will be used in many other sites.  As I understand it, in order to perform Sharepoint list queries from InfoPath in code I have to embed some site and list-specific values (site path, list GUID, etc).  How can that be a portable solution?

    TIA.

    Mike Frederick
  • 07-28-2011 11:50 AM In reply to

    Re: Do Form Load rules run before the FormEvents_Loading code?

    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.

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.