Mary A Randolph 31.Jul.12 08:23 AM a Web browser Applications DevelopmentAll ReleasesWindows 2000
I have been trying code to use to count documents in a view when the key name changes - the issue is different events are scheduled and each event requires a specific maximum count. Need to be able to count each event and send email to user when they reach their specific count. The events and max count are on one form to choose event and other fields exist on another form. The form is accessed via the web for users with notes backend. I am having many problems trying to do this can someone please help?
This is the latest code I have - NOT WORKING
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
'Dim collection As NotesDocumentCollection
Dim collection As NotesViewEntryCollection
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc=ws.CurrentDocument
Dim doc As NotesDocument
Dim doc1 As NotesDocument
Dim view As NotesView
Set db = s.CurrentDatabase
Set view=db.GetView ("Keyword")
key=doc.Choice(0)
While Not doc Is Nothing
key=doc.Choice(0)
If collection.count > CatCount Then
Dim emaildoc As NotesDocument
Set emaildoc = New NotesDocument(session.currentdatabase)
emaildoc.form = "memo"
emaildoc.subject ="Reached max number of documents for " + choice + ". Maximum = " + Str( catcount)
Call emaildoc.send( False, "maryjane@comcast.com" )
End If
Wend