15 pts.
 LotusScript / Agent
I have an exisiting database/app. that collects ideas. It's been around for a number of years. The owner wants to purge (but not delete) any submissions in the db that are 2 years or older and have them show in a new view, called "Retired Submissions." Once purged they should only show in the "Retired Submissions" view. There is an existing view, called "Ideas byDate" that I want to target, and pull entries from. So I have created an Agent called "(RetireSubmissions)" I am a true beginner, so can you help me a my Lotus Script/Agent to accomplish the above? The RetireSubmission Agent is set to run once a day at 2:00 AM. This is what I have so far, which does not really work: Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim view As NotesView Dim docCollect As NotesDocumentCollection Set session = New notessession Set db = session.CurrentDatabase Set view = db.GetView( "Ideas byDate" ) Dim lookupdoc As NotesDocument Dim lookupdocNext As NotesDocument Set docCollect = view.GetAllDocumentsByKey("Ideas byDate", False) Call docCollect .PutAllInview("RetiredSubmissions") Dim keys( 1 To 3 ) As String Dim i As Integer Set session = New notessession Set db = session.currentdatabase Set view = db.GetView("Ideas byDate") Set docCollect = view.GetAllDocumentsByKey( keys,True) For i = 1 To docCollect.Count Set lookupdoc = docCollect.GetNthDocument(i) If lookupdoc.Created > (Date -730) Then End If Next End Sub

Software/Hardware used:
ASKED: December 19, 2008  7:11 PM
UPDATED: December 19, 2008  7:30 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _