例: IsResortToView property (NotesViewColumn - LotusScript®)

次のエージェントは、列が別のビューへの変更が可能なユーザーソート列であるかどうかを切り替え、列のユーザーソート属性を表示します。

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 vc.IsResortToView Then
    vc.IsResortToView = False
  Else
    REM Make sure other IsResort's are off
    vc.IsResortAscending = False
    vc.IsResortDescending = False
    vc.IsResortToView = True
    vc.ResortToViewName = "View B"
  End If
  If vc.IsResortToView Then viewname = vcResortToViewName
  Messagebox "Resort ascending " & vc.IsResortAscending _
  & Chr(13) & "Resort descending " & vc.IsResortDescending _
  & Chr(13) & "Resort to view " & vc.IsResortToView _
  & Chr(13) & viewname,, _
  "User-sorted column options"
End Sub