logo

New Response

« Return to the blog entry

You are replying to:

  1. I have developed the following agent code which extends your original idea but also:-

    1) Modifies all views in the database

    2) Only updates the view if a change is needed.

    3) The agent can be scheduled to run multiple times per day reducing the chances that it does not run any day. All subsequent times it runs each day the agent will do nothing...

    Dim YesterdayDate As New NotesDateTime(Now)

    Dim TodayDate As New NotesDateTime(Now)

    Call TodayDate.AdjustDay(-1)

    Forall View In DB.Views

      If Instr(View.SelectionFormulae,YesterdayDate.DateOnly$) > 0 Then

        View.SelectionFormula = Replace(View.SelectionFormula, YesterdayDate.DateOnly, TodayDate.DateOnly)

        Call View.Refresh

      End If

    End Forall

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: