Pass a parameter to a web service at runtime? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Pass a parameter to a web service at runtime?

Last post 03-19-2009 02:39 PM by Veera. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-17-2008 06:35 AM

    • Bleak
    • Top 500 Contributor
      Male
    • Joined on 04-16-2008
    • Germany
    • Posts 28

    Pass a parameter to a web service at runtime?

     I'm trying to implement a web service based cascading drop down solution (countries-cities).

    For this I have built an LDAP web service that gets the necessary second-level data (cities) once provided with a parameter (country).

    This parameter needs to be passed from the first drop down to the web service.

    How  can I perform the following steps:

    1. Pass the current first drop down value to the webservice

    2. Assign the resulting location list to the second drop down.

     

    PS: I'm writing everything in C# and my form must be browser-enabled. 

    Filed under:
  • 06-17-2008 04:07 PM In reply to

    Re: Pass a parameter to a web service at runtime?

    Every data connection has a DOM associated with it. You can use a rule to set the query parameter in the DOM of your WS, and then query the WS. Set up your second drop-down to get all of it's display/value pairs from the WS results.

  • 06-20-2008 03:59 AM In reply to

    • Bleak
    • Top 500 Contributor
      Male
    • Joined on 04-16-2008
    • Germany
    • Posts 28

    Re: Pass a parameter to a web service at runtime?

     Ok, thanks. Pretty obvious, in retrospect.

  • 06-23-2008 03:29 PM In reply to

    Re: Pass a parameter to a web service at runtime?

    Great! Glad to have helped!

  • 03-19-2009 02:39 PM In reply to

    • Veera
    • Not Ranked
    • Joined on 03-19-2009
    • Posts 1

    Re: Pass a parameter to a web service at runtime? : InfoPath 2007 Rules and Cascading Dropdowns

    Hi

    I have developed a custom Document Information Panel (DIP) using a web service data connection for cascading dropdowns functionality. I am able to filter the dropdown values using web service parameters with rules. I can filter the dropdowns bi-directional. I have written a web service in such a way that it can filter the values bi-directional. E.g. If I select country, the state dropdown will be populated with appropriate states. If I select state, the country dropdown will be populated with appropriate countries. I have also added a refresh button to refresh the dropdowns for initial selection. User can refresh the dropdowns at any point of time.

    I achieved this using InfoPath 2007 rules. The downside of this approach was I am not able to select the default value for second dropdown upon selection (Because it is recursive...and will end up in a loop while executing the rules). The dropdown value is empty and user needs to select the appropriate value. In my current requirement I have eight cascading dropdowns are there in the InfoPath form.

    How to set the default value in my requirement? The default value would be second value in the current selection. Is there a way to do using code? Any help appreciated.

    Thanks,

    Veera

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