Example of an agent to update a view's selection that includes a year.
Dim s As New NotesSession
Dim db As NotesDatabase ' current db
Dim sV As NotesView ' view to modify
Dim yrthis as Integer ' this year
Dim selstr As String ' selection string for view
' setup environment
Set db = s.Currentdatabase
Set nowNDT = New NotesDateTime(Now)
Set sV = db.Getview("webFrmCur") ' gets the view by alias/name
yrthis = Year(Now)
' update the view selection
selstr = {SELECT Form="MyForm" & DocYear= "} & Cstr(yrthis) & {"}
sV.SelectionFormula = selstr
' refresh view
Call sV.Refresh()
previous page
|