Examples: IsSorted property (NotesDocumentCollection - LotusScript®)

This script checks if a collection is sorted. Since the collection is produced using the FTSearch method, the IsSorted property is True and the script displays a dialog box stating that "This collection is sorted."

Sub Click(Source As Button)
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Dim collection As NotesDocumentCollection
  Set db = session.CurrentDatabase
  Set collection = db.FTSearch( "white wine", 0 )
  If collection.IsSorted Then
    Messagebox( "This collection is sorted" )
    Messagebox( "This collection is unsorted" )
  End If
End Sub