Populate dropdown list from web service - InfoPath Dev
in

InfoPath Dev

Populate dropdown list from web service

Last post 11-06-2006 10:52 AM by dream1213. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-02-2006 04:19 PM

    Populate dropdown list from web service

    I have an Infopath 2003 form with dropdown list populated the values of list through webservice.

    I can set the request parameters manually in design time. It works well when the form opening.

    The question is:

    Is it possible to set the request parameter from a text field on the form?

    or selected from another dropdown list, to repopulate it again?


    Thanks advanced,


    Eugene
  • 11-02-2006 08:11 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Populate dropdown list from web service

    Hi Eugene,

    Follow these steps,

    1. Drag and drop your parameter text fields into the InfoPath form.
    2. Add a button to your form and double click it to bring up properties.
    3. Click rules and add.
    4. Click Add an Action.
    5. Select Submit using a data connection and choose the submit you would like to use.
    6. Close the dialogs and preview your form.
    7. Enter text in above filed (step1).
    8. Click on Submit button.

    By using code we can set the parameters to the text field before query. The code below describe how to query and read the result of a
    webervice(Datasource) with Infopath

    //Request information from the webservice
    WebServiceAdapter2 myWebAdapter = (WebServiceAdapter2)thisXDocument.DataAdapters["AdapterName"];

    //Fill parameter
    myWebAdapter.DOM.selectSingleNode("XPath").text = parameterText;

    //Send the query
    myWebAdapter.Query();
  • 11-03-2006 02:06 AM In reply to

    Re: Populate dropdown list from web service

    Hi,

    Try out this link
    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=419
    Hope this will help you.
  • 11-06-2006 10:52 AM In reply to

    Re: Populate dropdown list from web service

    Thank you all, I am going to try it by using code.

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