Sorting Documents in a DocumentList

Hello All,

I have a requirement.
I have a document list with data including timestamp information.
Now, i need to sort these documents inside the list in ascending order of timestamp.

Can this be done.
Meaning, i pass document list to a service which performs this logic, and as output, i get a document list which has the child documents sorted in ascending order of their timestamp.

Is there an built-in service that we can use?

Thanks & Regards,
Khushaboo Shandilya

Hi Again,

Yes, there is in-built service available in WmPublic package doc folder sortDocuments which you can use for sorting of documents on any ASC and DSC pattern. You can use comparestring by selecting any one of option (string, datetime & numeric).
For more details- please refer Developer guide.

Thanks,
Kuldeep Guipta

1 Like

As soon as i posted this, I found the service! Eureka!
:slight_smile:

Issue Solved!
Thank you so much Kuldeep!

Regards,
Khushaboo Shandilya

1 Like

Additional Source for documentation might be the IS Built-In-Services Reference, which also explains the inputs, outputs and usage of the services.