Manage Learn to apply best practices and optimize your operations.

LotusScript sorts a Lotus Notes document collection

This LotusScript code shows how to sort a Lotus Notes document collection in ascending order using a specified field (text/date/number) as the key. The code is customizable, so you can easily change it to meet your needs.

Using this LotusScript code, I can sort a Lotus Notes document collection using a specified field, such as text/date/number, as the key.

This example shows entries in ascending order, but the array sort within the function can be extended.

Note: The comment within the code explains what happens as the code goes into effect.

LotusScript sorts doc collection
(Click on code for enlarged view and script download.)

Do you have comments on this tip? Let us know.

This tip was submitted to the tip library by member Jeremy Collett. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Related resources from

Dig Deeper on LotusScript

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...