Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Workbench
Viewing all articles
Browse latest Browse all 69588

Problem with populating dynamic drop down

$
0
0

I am hoping someone can help.

 

I have a process that is retrieving a series of codes from a table. It generates an XML which I have bound to a text field on the form. For testing, the field is visible and I can see the XML when I run it.

 

However the code that I am using to populate the drop down is not working.

 

I'm ot sure if I have done somethin wrong in the process or in the form.

 

The XML in the field looks like:

 

<?xml version="1.0"?>

<xdp>

     <datasets>

          <data>

               <form>

                    <Page1>

                         <type>

                              <assignedOther>

                                   <code>

                                        <CD type="CHAR">ES</CD>

                                   </code>

                                   <code>

                                        <CD type="CHAR">EX</CD>

                                   </code>

                                   <code>

                                        <CD type="CHAR">NF</CD>

                                   </code>

                              </assignedOther>

                         </type>

                    </Page1>

               </form>

          </data>

     </datasets>

</xdp>

 

 

In the JavaScript of the form I have:

 

var parsedOther = new Array();

var taxtypeXML = XMLData.parse(form.Page1.type.assignedOther.rawValue, false);

var otherList = XMLData.applyXPath(taxtypeXML, "//code[*]/CD");

if (otherList.length){

     for (var i = 0; i < otherList.length; i++){

          parsedOther.push(otherList.item(i).value);

     }

}else{

     if (otherList.value){

          parsedOther.push(otherList.value);

     }

}

parsedOther.sort();

otherExpl.setItems(parsedOther.toString());

 

 

assignedOther if the text field that has the XML and otherExpl if the drop down fiend.


Viewing all articles
Browse latest Browse all 69588

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>