View showing a rolling 12 months

I asked this before but was not really clear in what I wanted. We keep track of time for our employees in notes. They clock in and out using a notes client.

We keep track of tardies and such for the employees using a rolling 12 months. When April of this year starts then a month will drop off from last year. Is there anyway to make a view that will automatically keep a rolling 12 months or will the view need updating every month?

Subject: View showing a rolling 12 months

Tom,

You can simply have an agent come along and change the selection formula for the view. It will take a little lotus script, but at least no body has to remeber to change the view.

John

Subject: View showing a rolling 12 months

Hey there Thomas.I wrote a series of articles on fiscal year calculations in views on my blog a while back. You might want to take a look at those (along with my sample code) as a starting point for what it is you are attempting to do.

First article:

http://www.devinolson.net/devin/spankysplace.nsf/d6plinks/DOLN-6L6G8T

Second article:

http://www.devinolson.net/devin/spankysplace.nsf/d6plinks/DOLN-6L75BC

Third article:

http://www.devinolson.net/devin/spankysplace.nsf/d6plinks/DOLN-6L8GXP

Sample Code (downloads page):

http://www.azlighthouse.com/downloads.html

Hope this helps!

-Devin.

Subject: View showing a rolling 12 months

how about a scheduled agent set to run on the first day of every month like

Dim s As New NotesSession

Dim db As NotesDatabase

Dim view As NotesView

Dim formula As String



formula = "SELECT (@Modified > [" & (Date - 365) & "])"





Set db = s.CurrentDatabase

Set view = db.GetView("TestView")

view.SelectionFormula = formula

Subject: View showing a rolling 12 months

The best way I see is to create a weekly(or whatever time) agent to flag documents that fall into the 12 month window and remove flag once they fall off. Use the flag as criteria for appearing in your rolling view.