Cascading drop downs - InfoPath Dev
in

InfoPath Dev

Cascading drop downs

Last post 04-12-2007 11:00 PM by B.Shiva Prasad. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-12-2007 03:37 PM

    • jdogan
    • Not Ranked
    • Joined on 01-15-2007
    • USA
    • Posts 9

    Cascading drop downs

    I have 2 drop-down boxes bound to secondary data sources (web services if it matters). The first simply contains a list of states, and the web service call doesn't require any parameters. The second contains cities within the selected state, so that call requires 1 input parameter (the ID of the selected state). This is a classic cascading drop down situation.

    However, I have the following constraints. I am working within a template part, which means I don't have access to managed code. I am also working on a browser-enabled form, which means I can't use filtering. The only option as I see it is to use rules, and I am stuck on the following issue.

    When the user selects a state, a rule fires that sets the queryField value for the city web service call to the selected state ID. The rule then queries the data connection and the cities are loaded. This works fine. However, if the user selects a city, and then goes and selects another state, the rule is fired again and the cities for the newly selected state are loaded. The problem is that the old city that the user selected is no longer in the list, so the city dropdown displays the old city ID instead. I just need to figure out a way to clear out the old city selection.

    I have read various tutorials, but each of the ones I've found don't work due to my constraints. Can anyone enhance my rules logic or point out an alternative solution?

    Thanks a bunch!

    Jason
  • 04-12-2007 11:00 PM In reply to

    Hi jdogan,

    Try like this and see the result if you didnt get let me know the problem where it is getting.

    1. Double click on the State drop down and click on the rules.
    2. Click add button and set the condition as
    state drop down is not blank
    3. Click ok and click on the Add Action and select the set a field value.
    4. select city field in the field text box and leave empty in the value text box and click ok.

    now see the preview.

    Hope this will help you.
    B.Shiva Prasad
    InfoPath Dev,
    http://www.ggktech.com
    India
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.