When to use FormLoad and When to use finishedLoading? - InfoPath Dev
in

InfoPath Dev

When to use FormLoad and When to use finishedLoading?

Last post 11-18-2014 08:38 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-12-2014 10:24 AM

    When to use FormLoad and When to use finishedLoading?

    I know there are differences between "Form Load" and Qrules "finishedLoading."

    Up to now I have, probably like many newbes, used Form Load a lot. I know finishedLoading insures that the form is fully loaded before it processes the scripts in it.

    My Question is pretty much this: 

    Are there things that would be better to put in Form Load and others in finishedLoading?

    If so, what would they be, and why?

     Thanks!

     

  • 11-17-2014 12:21 AM In reply to

    Re: When to use FormLoad and When to use finishedLoading?

    Hello RayzerMatic and thanks for being a qRules customer!!!

    If your forms are using qRules, you need to use finishedLoading in place of the Forms Load rule.

    It's not a better-than debate; it's a this-works debate. Using Forms Load rules with qRules is not good.

    Why? Well, that's because qRules has special logic on forms load that checks several things and if you use Forms Load, you are essentially injecting subterfuge into the rules logic ... I'm sure Hilary could give you a better explanation, but I'm not the qRules developer (she is!). :) 

    Thanks,

    Patrick Halstead
    Project Manager at Qdabra
  • 11-17-2014 06:13 AM In reply to

    Re: When to use FormLoad and When to use finishedLoading?

    Gotcha... Will do.  :) 

     Thanks!

  • 11-18-2014 08:38 AM In reply to

    Re: When to use FormLoad and When to use finishedLoading?

    Hi - In InfoPath, rules run before code. If you try to use qRules commands on Form Load rules, those rules might run before the code has completely loaded. That's why we added the finishedLoading node - we set it to true from the code once the code is all loaded. So you can use rules on finishedLoading that execute when finishedLoading is true to get the same effect as Form Load rules. If you have any qRules commands you need to run when the form opens, use finishedLoading.

    Hilary Stoupa

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