Manage Learn to apply best practices and optimize your operations.

Track Who Reads What Documents

There have been times where you what to see who has been reading what documents
in a database. This helps track if the right audiance is looking at your
documents and what documents are being used and which ones are not beeing
looked at.

There are 2 methods to accomplish this:
In the Terminate event of the database document, put the following script in.
This script will do 2 things when a document is closed:

a) it will mail a notice to a log database that you have to create. This
database you can create from a blank template and create one form called a
"memo" with 3 fields: From, Subject & PostedDate. And

b) update a "who_read" field you add to the form.

Obviously you do not need both features, just 1 of them: either create a
database log of who reads what documents or a reader field.
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim maildb As NotesDatabase
Dim maildoc As NotesDocument
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim item As NotesItem

Set uidoc = workspace.currentdocument
Set doc = uidoc.Document

' Get the reader name and current date & time
user = Evaluate("@Name([Abbreviate]; @UserName)")
dateread = Evaluate("@Now")
readstring = user(0)
readstringdate = dateread(0)
displayall = readstring & " : " & readstringdate

' Append the current reader and date to the WhoRead field
Set item = doc.GetFirstItem( "WhoRead" )
Call item.AppendToTextList(displayall)
Call doc.Save(False,True)

' Mail the data to the log database for easy searching
mailsubject = uidoc.FieldGetText("Subject")
Set maildb = session.currentdatabase
Set maildoc = New NotesDocument ( maildb )
maildoc.Form = "Memo"
maildoc.SendTo = "name of mail-in database"
maildoc.Subject = "Read America Wire Dcoument titled: " + mailsubject
Call maildoc.Send( False )

Dig Deeper on Domino Resources - Part 6

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...