I have a web service that I created using Workbench, and it is using the Query Multiple Rows as XML component. It returns multiple items depending on criteria supplied by the form filler. The data is being placed into a drop down field. In order to facilitate this I followed what I had read previously in these forums, which is to load the xml into the DOM and then navigate to the nodes needed and loop through and add then into the drop down. That works great. The problem happens when I want to reset the data in the drop down in order to facilitate another query. So what happens in the form is:
A user is presented with a drop down that has two options, to 'add new object', or to 'edit existing object'.
If the user selects 'add new object', a blank form is displayed and the user can fill it out. Once the form is filled out, a web service takes the information and creates a row in the database.
If the user selects 'edit existing object' a web service fires and brings back xml data and places the data into two separate drop downs, one for 'staff lead' and one for 'departments'. When they select an option, another web service fires to query the database based on the selection. It works fine the first time. But say someone decides to change an option from either the 'staff lead' or the 'departments' drop downs, which would logically change the criteria for the query, things get crazy. I have to use the xfa.data.nodes.remove command in order to remove the nodes from the DOM so that the next query comes in and loads into the DOM correctly. If I don't do this, then the drop down keeps the previous data in it.
The problem is that once you use the command on a Dynamic form (this is important, the form must be dynamic.) things start disappearing on the form. Can't figure out why. Help...
Very important: The form needs to be a dynamic form. The problem does not happen on static forms.
Mike