例: SecondaryResortColumnIndex property

次のエージェントは、ユーザーソート列に 2 次ソート列を設定できるかどうかを切り替え、列を特定します。

Sub Initialize
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Dim view As NotesView
  Dim vc As NotesViewColumn
  Set db = session.CurrentDatabase
  Set view = db.GetView("View A")
  Set vc = view.Columns(0)
  If Not(vc.IsResortAscending Or vc.IsResortDescending) Then
    Messagebox "Not resortable column",, "Not resortable"
    Exit Sub
  End If
  If vc.IsSecondaryResort Then
    vc.IsSecondaryResort = False
  Else
    vc.IsSecondaryResort = True
    vc.SecondaryResortColumnIndex = 2
  End If
  Messagebox vc.IsSecondaryResort & _
  " Column " & vc.SecondaryResortColumnIndex,, _
  "Secondary resort"
End Sub