Timing Issue for Form Load rules - InfoPath Dev
in

InfoPath Dev

Timing Issue for Form Load rules

Last post 10-17-2013 06:28 AM by larslynch. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-02-2012 07:20 AM

    Timing Issue for Form Load rules

    I have a browser form on Infopath 2010 and Sharepoint 2010. I am attempting to pass a parameter to the form using a page with the Infopath webpart and the QueryString filter. I am getting the parameter fine, but if I attempt to perform a rule on the value in the Form Load event, the parameter does not appear to be there yet. That is, If the parameter is "Yes: and in the Form Load section I do a rule (If parameter="yes), the rule fails, yet if I include the parameter on the form, I see that the value is there. It is not extra characters or anything to do with the matching of the values. This has to be a timing issue, where the value does is not there when the Form Load rules are run, but is subsequently there.

    Any ideas?

    Chip

  • 05-02-2012 08:57 AM In reply to

    Re: Timing Issue for Form Load rules

    Yeah, I'd bet you are right - rules run before code, and while I won't claim to understand the mechanism InfoPath is using to get that query filter value, I'd assume it just isn't present when your form load rules run.

     As to a work around - that may be tough... But perhaps you could set your rule on the field you are setting to yes? That is, the parameter changes the field, and then you logic executes?

    Hilary Stoupa

  • 10-17-2013 06:28 AM In reply to

    Re: Timing Issue for Form Load rules

     I had the same issue and following Hilary's clue, I was able to use change rules to make it happen for a dropdown lookup list (not available as a connection target from the Query webpart).

     1. Create a visible field on the form for your incoming parameter (textbox, calculated value, etc).

    2. Create an action rule that fires when the value of this field changes to do whatever you need to get done (set dropdown or other field).

    3. Create a formatting rule that always hides this field.

     

    My blog post: http://larslynch.blogspot.com.es/2013/10/passing-url-parameter-to-infopath-and.html

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