Sorting files on xml sub element

Hello, I receive XML data files from a client, we create PDFs from them in designer. I’d like to be able to sort the output PDFs based on a repeating child element in the file. Can I do this through the data mapper? I’m attaching a screenshot of the elements.

Also, is there a way for me to add a script in based on these child elements from the xml file?

Thanks,

XML_Data1

If I understand your question properly, you want to sort your resulting PDF pages based on value from the detail table?

If this is the case, that would be done in the JobPreset (sorting section)

As far as adding a script based on the same elements, I must say that I am confused as what you intend to do. Can you explain a little more in depth what it is you are trying to achieve?