LotusScript / Agent

15 pts.
Tags:
GetAllDocumentsByKey
Lotus Agents
LotusScript
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
ASKED: December 19, 2008  7:11 PM
UPDATED: December 19, 2008  7:30 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following