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

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
Adobe Summit 2023 | Complete list of AEM Sessions & Labs

Sorting XML data linked to a drop-down list


Level 3

I am looking for a javascript code that I can use to sort XML data linked to a drop-down list when the list is accessed by mouse-down. For reasons that I can't get into here, I cannot sort the xml before loading it into the form.

I am using LiveCycle Designer ES 8.2.1

0 Replies


Level 10

Hi Dave,

I would to know, how do you set the data items in the dropdownlist?

Is it from a database or is it set manually with JavaScript?

If you set it with JavaScript how do you manage to insert the data items in the dropdownlist?


Level 3

I clicked on "List Items" in the Object/Cell tab and made a data connection to an XML file. There are about 600 items in the data source, so I didn't want to type them all in.


Level 3

My data is coming from an excel spreadsheet that is updated about once a month. I am creating an XML file from that data and then importing into my pdf. I haven't tried using an XSLT stylesheet to transform it. I'm not familiar with them, so I will have to look into it.

This is the first time that I have pulled in outside data, so I'm trying to learn quickly.


Level 10

Hi there,

Good method to sort XML with XSLT!

As I would have suggested you to have a second dropdownlist to be the displayed data view,

If you rather use another method than XSLT, you could try retrieving each data inside the dropdownlist and create an Array out of it.

With the array you can use the method sort(); and once sorted out, you only need to insert them in the displayed dropdownlist data view.

Hope you will manage to make this work!