its the xml in your project? where are you getting the xml from.
You should look at the URLLOADER for this type of thing then loop through values and add to your dataprovider.
are you doing all that?
We get the XML from LiveCycle which gets data from an SQL Database. I can see the XML in the debugger watched expressions and it looks OK. It works with the function that finds the index of the value. But there has to be a more simple method to get to the results.
You should be able to set the selectedItem to the XML node.
When I use this:
compDT.dtSODC.selectedItem = XMLRecord.SODC;
where the value of XMLRecord.SODC is "Choate" I see this:
 = XML
I would have expected to see just the value. Is there something I should put on the XML side like ".text" or ".value"?
1 person found this helpful
Almost all XML "queries" return an XMLList. The debugger and trace will
sometimes coerce an object to a String. Are you trying to match against a
String in the ComboBox's dataProvider? If so, try
Belated (we were off yesterday) thanks.
What I found was the XML assignment was moving the XML node including the openning tags. To get around that, I changed it to:
compDT.dtSODC.selectedItem = XMLRecord.SODC.toString();
Unfortunately, Flex won't provide any code assist with the XML side so I had to just go on faith that it would work (using the toString method with XML). Fortuantely, it does work.
This eliminated a call to a function to test input values against a bunch of "if" statements and assigning a number (the index of the dropdown box) to a variable used later with the selectedIndex property. More importantly, it eliminates the need to have the array duplicated in the array and "if" statement form. Now there is only one place to have the data entered and the rest just happens.
In the other controls the ".text" seems to take care of the conversion from an XML notation to a string one.