Email:   
Home
In This Issue
Email a Friend
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
How to audit your address book: the design (continued)

While we were at it, we decided that anything that could be checked would be checked, a kind of deep audit of the address book Person records from the perspective of identification, addressing, and mailing. So that you don't get overwhelmed, the entire process has been broken up into two separate articles. But don't worry; you don't have to wait a whole month to read the rest. You'll find both articles in this issue of DominoPower!

How does the code help?
What I did was to write a simple agent and put it in a separate database so that we could run it easily against different address books. It's a Run Once agent. The LotusScript is not the most finished and polished of code because it was created as a one-off for the exercise; speed of creation was the essence. At the end of the second article I'll make some suggestions as to how it could be altered or improved.

Let's look at the code
The code starts in the normal way. You do add comments to your agents to help identify what they do, don't you? You can see where the name of the server and Domino Directory need to be specified.

Sub Initialize
'UALS November 2001: Check Notes directory for Person records with odd or non-standard values in important
'mail or personal identification fields.

'Reviewed and cosmetic changes made Aug 2002 for Dominopower Article.

'See comments below for code lines (marked <<<< in comments) to be changed to use in other situations.

Dim Db As New notesdatabase("server1/org","names.nsf") '<<< Identify the server/database to be checked
Dim users As notesview
Set users = db.getview("People")
Dim ServerView As NotesView
Set ServerView = DB.getview("($Servers)")
Dim ServerDoc As NotesDocument
Dim pers As notesdocument

This array of counts and severities enables us to count how many person records are dealt with and the maximum severity of problems on each. You'll see below what I mean by the three severities of problem.

Dim count(3) As Integer '0 is total, rest are severity
Dim sev(3) As Variant

We create a document for the report and set up for it to be sent as a mail memo. The ReplyTo field is set so that we're in control of any replies. Why would we do this? Well there was always the possibility in my mind that my original customer would run the agent as a scheduled agent, in which case the "From" field gets filled in with the name of the agent's signature, which might be a server. In such cases, any reply would go missing or dead somewhere; setting the ReplyTo field avoids this. Indeed, I make it a must that, in all cases where mail is sent programmatically, the ReplyTo field is always set to some appropriate value--the Administrator, for example. Why people would reply to such agent-generated mail is a mystery, but they do.

Dim ReportDoc As New NotesDocument(DB)
reportdoc.form = "Memo"
reportdoc.subject = "Address Book Checks on " & db.title
Dim ReportDocBody As New notesrichtextitem(ReportDoc, "Body")
reportdoc.sendto = "Mick Moignard@unipart"; '<<<< Enter Notes email address of intended recipient of the report.
reportdoc.replyto = "Mick Moignard@unipart"; '<<<< A value here means that ant accidental replies don't go to hyperspace

Here you can see the definitions of the severities.
Call reportdocbody.appendtext("Issues found in the " & db.title & " Notes Directory. Severity of items is marked (1), (2) or (3). ")
Call reportdocbody.addnewline(1)
Call reportdocbody.appendtext("Severity 1 items are those which impair the functionality of Notes, and should be corrected.")
Call reportdocbody.addnewline(1)
Call reportdocbody.appendtext("Severity 2 items are those which don't meet corporate policy.")
Call reportdocbody.addnewline(1)
Call reportdocbody.appendtext("Severity 3 items are benign - they have no deleterious effect, but may offer no value either. ")
Call reportdocbody.addnewline(1)
Call reportdocbody.addnewline(1)




[ Prev | Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

2-Minute Tutorials
How do I...

  • integrate MS Office or OpenOffice with Notes?
  • create cross-tab reports and charts?
  • print serial letters and mailing labels?
  • create PDFs in Lotus Notes?


Check out the 2-minute tutorials here.
-- Advertisement --

DEPARTMENT CALENDAR - MANAGE AND SHARE A COMMON CALENDAR WITH YOUR TEAMS
Are you responsible for improving your organization's Group Calendaring tool? Have you been tasked to find a true group calendar tool with Itinerary, Time-Off, Sign In/Out and Bulletins/Events module that seamlessly integrates with Domino calendaring?

If so, Logic Springs Technologies will make answering these questions a whole lot easier!

Learn how by visiting us at www.departmentcalendar.com

Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login