up (updates to the data were minimal), we set all views to Manual indexing.
This agent updates primary views first, then does all of the remaining views.
I call it hourly, when the agent dies during a run it just resumes the same
view later, by virtue of the other views already being updated and being quick
to finish the second time around.
Change the names of the "MainViews" variable to your own primary views, and
change the number if desired as well. Enjoy.
Sub RefreshViews( All As Variant )
' If all is true, all views are updated. If false, only the Main views
' Refreshes Main views first...
Dim MainNames ( 5 ) As String
Dim view As NotesView
Dim Db As NotesDatabase
Dim session As New NotesSession
Set Db = session.CurrentDatabase
MainNames( 0 ) = "MultiSort"
MainNames( 1 ) = "byCertifier"
MainNames( 2 ) = "ByFilename"
MainNames( 3 ) = "Multisort Resp"
MainNames( 4 ) = "ID"
MainNames( 5 ) = "$UserName"
Forall viewname In MainNames
Set view = Db.GetView( viewname )
If Not ( view Is Nothing ) Then
' After finishing updating the Main views, update ALL views if we wish to...
' Duplicate views to the Main views will be VERY quick, so don't worry about
If All Then
Forall otherview In Db.Views
If Not ( otherview Is Nothing ) Then