Time-dependent views without refresh icon #2
madicon.de/Tipps & Tricks/Time-dependent views without refresh icon #2

Time-dependent views without refresh icon #2

In response to the tip Time-dependent views without refresh icon #1, I received a hint that another option is to have the view's selection formula rewritten by an agent, for example on a daily basis.
 
In LotusScript, the NotesView class provides the SelectionFormula property, which allows both read and write access to a view's selection formula.
 
From the online help:
Defined in
NotesView
 
Data type
String
 
Syntax
To get: formula$ = notesView.SelectionFormula
To set: notesView.SelectionFormula = formula$
 
Example for writing the filter (from the online help):
Sub Click(Source As Button) Dim ws As New NotesUIWorkspace Dim uiview As NotesUIView Dim view As NotesView Dim formula As String formula = "SELECT (@Modified > [" & (Date - 7) & "])" Set uiview = ws.CurrentView Set view = uiview.View view.SelectionFormula = formula End Sub
 

Amazon Affiliate Link
notion image