How to Sort a List of Values

Using the @Sort function, you can sort a list of values in descending or ascending order.

How It Works

The @Sort function is a built-in Formula Language function. This function requires two parametersa list of values and the sort order expression(s). There are numerous sort order expressions, including










One or more expressions can be specified in the function call. Each expression must be enclosed in brackets and separated by semicolons.


To sort the list, simply include the list of values and sort order expression(s). The following illustrates how to sort a list of values in ascending order (see Figure 14.20). Simply replace the list of values or assign a field to the myValues variable. The @Prompt statement is used for illustrative purposes and can be removed or updated as desired.

myValues := "Mark" : "Ryan" : "Kyle" : "Alex";
result := @Sort ( myValues; [Ascending] );

@Prompt([Ok]; "Sample Sort";
"Original List: " + @Implode(myValues; ", ") + @NewLine +
"Sorted List: " + @Implode(result; ", "))

Figure 14.20. Example of the @Sort function

An Introduction to the Lotus Domino Tool Suite

Getting Started with Designer

Navigating the Domino Designer Workspace

Domino Design Elements

An Introduction to Formula Language

An Introduction to LotusScript

Fundamentals of a Notes Application

Calendar Applications

Collaborative Applications

Reference Library Applications

Workflow Applications

Web Applications

Design Enhancements Using LotusScript

Design Enhancements Using Formula Language

View Enhancements

Sample Agents

Miscellaneous Enhancements and Tips for Domino Databases

Data Management


Application Deployment and Maintenance


Appendix A. Online Project Files and Sample Applications

Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?

Lotus Notes Developer's Toolbox(c) Tips for Rapid and Successful Deployment
Lotus Notes Developers Toolbox: Tips for Rapid and Successful Deployment
ISBN: 0132214482
EAN: 2147483647
Year: N/A
Pages: 293
Authors: Mark Elliott © 2008-2020.
If you may any questions please contact us: