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