Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Having a problem parsing XML from web service & dropdown list

ECLCArchitect
Level 1
Level 1

I have 2 data connections that are programmatically invoked via exit event on different fields in form.  Both have identical code with only difference is that one populates a multiselect list box and one populates a drop down list.  The one that populates the listbox works fine.  Everytime Field A changes, it is fired and the results parsed then listblox updated.  The one with the drop down list is not working at all.  The form is used in Workspace.  When I use the javascript debugger, I see the correct node values output to the console window.  The problem is that the value is not successfully added to the drop down list existingFileNumber.  Anyone have any great ideas?  Like I said, this works perfectly in the same form for a different web service and a listbox.

Here is the code for firing and parsing the dropdown list data:

Form.sRoutingTransmittalSlip.sPreparer.existingFileNumber.clearItems();

Form.sRoutingTransmittalSlip.phaseHidden.rawValue="PI";

xfa.connectionSet.getInfo.execute(0);

var pls2=xfa.datasets.createNode("dataGroup","pls2");

pls2.loadXML(Form.sRoutingTransmittalSlip.fileNumbersHidden.rawValue,false,true);

xfa.datasets.data.nodes.append(pls2);

var dataGroup=xfa.resolveNode("xfa.data.pls2.Matters");

var dataGroupLength=dataGroup.nodes.length;

if (dataGroupLength==0) {}

else {

  for (var i=0;i<dataGroupLengthl;i++){

     console.println(dataGroup.nodes.item(i).nodes.item(0).value);

     Form.sRoutingTransmittalSlip.sPreparer.existingFileNumber.addItem(dataGroup.nodes.item(i).nodes.item(0).value);

  }

}

0 Replies