LOTUSSCRIPT/COM/OLE CLASSES


Examples: IsFormula property
This agent displays whether the columns in a view are based on fields or formulas, and displays the item name for fields and the formula for formulas.

Sub Initialize
 Dim session As New NotesSession
 Dim db As NotesDatabase
 Dim view As NotesView
 Dim f As String
 Set db = session.CurrentDatabase
 Set view = db.GetView("View A")
 Forall vc In view.Columns
   title = vc.Title
   If title = "" Then title = "<No title>"
   If vc.IsField Then
     Messagebox "Column is based on field " & vc.ItemName,, _
     "Column " & vc.Position & " - " & title
   Elseif vc.IsFormula Then
     Messagebox "Column is based on formula:" & Chr(13) & _
     vc.Formula,, "Column " & vc.Position & " - " & title
   Else
     Messagebox "IsField and IsFormula are both False",, _
     "Error"
   End If
 End Forall
End Sub

See Also