Search DominoPower's 11,437 Lotus-related article archive 
Home
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.
Twitter Feed Click here for the Twitter feed.
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)


« Previous  ·  1  ·  2  ·  3  ·  Next »
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
Adding Quick Highlighter support to IBM Lotus Notes Domino Wiki, Weblog, or Webpage
Remember Young Admins...there are 2 files
WebSphere Portal 6.1.0.2 and Lotus Domino 8.5
The CKEditor - with Domino
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.

Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.

Learn how to easily clean up your address book.

-- Advertisement --

Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.

Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).

Tap here to get started!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login