|
|
|
|
|
|
|
|
|
|
|
|
|
|
How to audit your address book: the design (continued)
We're reading all the documents from the People view and doing a standard Do While to continue to the end. The read of the next record is at the end of the loop.
Set pers = users.getfirstdocument
Dim fn As notesitem
Do While Not (pers Is Nothing)
|
Just in case the code gets changed to work off a different view, we make sure that we only deal in Person records. Note that for some reason the Notes Directory also has a Type field that seems to contain the same value. Why, I don't know.
If pers.form(0) = "Person" Then 'skip groups, mailin Dbs, etc, etc
sev(1) = False 'use to mark the highest sev level per person, so we do useful counts.
sev(2) = False
sev(3) = False
|
The whole handling of names is done in the agent with NotesName objects. This enables us to take a name in any form (but canonical and abbreviated are the most valuable) and then be able to access any part or form of the name as properties of that object: the NotesName does all the parsing and format conversion for us. Neat.
Here we pick up the owner field from the Person record. Remember this is the name value that we assume is the most likely entry on the Person record to actually match what is on the user's Notes ID file.
Dim realfullname As New notesname(pers.owner(0)) 'assume that the Owner field contains the actual name from the ID File.
Call ReportDocBody.appendtext("Processing: "& realfullname.abbreviated & " (" & pers.firstname(0) & " " & Pers.lastname(0) & ")")
Call reportdocbody.addnewline(1)
|
Next we can start the actual checks. In part two of this article, elsewhere in this issue of DominoPower, you'll find all the code for that part of the procedure. You'll also find my suggestions for improvements as I promised earlier. So, if you've got everything above mastered, head on over to continue the journey.
Mick Moignard has been working and traveling with Notes since Release 2.0 in 1991. He is a Principal CLP with Unipart Advanced Learning Systems, a Lotus Advanced Partner in the UK. If you want a copy of the code discussed in this article, or want to discuss anything to do with this article, or indeed anything else to do with Notes and Domino, email Mick at mick_moignard@unipart.co.uk. UALS, at http://www.uals.co.uk, will also happily discuss any Notes and Domino application development opportunities or infrastructure projects with which you need help.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done.
Native to Lotus Domino. The User Experience unseen for Lotus Domino.
Do more with less. Really.
See the possibilities Docova unleashes for Lotus Domino. |
-- Advertisement --
Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.
Register by April 10 to save $200. |
|
|
|
|
|
|
|
|
|
|