
Announcements
Hi everyone,
I'm currently working on a Power Automate flow that reads PDF files from a SharePoint folder and displays them in a dropdown menu within an Adaptive Card in a Power Virtual Agent.
The flow works and the files are listed correctly – however, I’d like to sort the filenames alphabetically in ascending order before showing them in the dropdown. So far, my approach looks like this:
List folder (using "Get files")
Filter array – Only keep items where Name ends with .pdf
Build array – Map each item with title = Name, value = Name
Compose – Assemble the JSON string for the Adaptive Card dropdown
Is there a simple way to sort the array of PDF filenames in ascending (A to Z)?
Any tips on how to best integrate the sorting step into this flow would be greatly appreciated!
Thanks in advance
Filter Query
substringof('.pdf', FileLeafRef) and FSObjType eq 0
Order By
FileLeafRef asc