Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Problem with populating dynamic drop down


Level 2

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"?>









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



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



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









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++){




     if (otherList.value){






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

2 Replies