 |
| |  |
Home In This Issue Email a Friend EasyPrint
 | |
|
PROGRAMMING POWER
How to audit your address book: more code
By Mick Moignard
Now we start the actual checks. If you haven't already read part one of this article, elsewhere in this issue of DominoPower, you should do so now. If you've mastered the code in part one, then let's move on.
First we check the Fullname field (this is the Person record field called User Name on the form) which allows all the different names and nicknames to be specified. When a new person is registered in Notes, the registration process adds the canonical format of the name as the first entry. It's displayed as abbreviated, but if what's stored is not actually the canonical form, then things will go wrong down the line, for example, type-ahead's name resolution as described in Knowledgebase item 180944. The second fullname entry is set to the common name. As we will see, it actually doesn't matter where in the list the common name form appears.
'1 check that the Fullname (username) 1st value is the canonical name and
If Lcase(pers.fullname(0)) <> Lcase(realfullname.canonical) Then
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(1) Owner field does not match 1st User name value (or Username(1) is not canonical): " & pers.fullname(0))
Call reportdocbody.addnewline(1)
sev(1) = True
End If
|
Having checked this, we then check that the name we use as the authentic canonical name, the owner field, has the same common name as that constructed from the first name and lastname. This matters, because a common name, and therefore a canonical name, that does not match the name on the ID file will also cause odd things to happen in name resolution. It was safe to do this check on firstname and lastname only for this customer because they don't use the middle initial, but if you do use middle initials, you should modify this code.
'2 check that the Id file name is firstname/lastname.
If Lcase(realfullname.common) <> Lcase(Trim(pers.firstname(0) & " " & pers.lastname(0))) Then
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(2) Notes ID file name does not match firstname/lastname 'human name': " & pers.firstname(0) & " " & pers.lastname(0))
Call reportdocbody.addnewline(1)
sev(2) = True
End If
|
This next piece of code checks that the common name that we have assumed will be on the ID file is present somewhere in the Fullname field. It's usually the second entry, but it doesn't have to be. Therefore we loop around all the entries and check each one. While we're at it, we also check whether the firstname/lastname combination is somewhere in Fullname. These (the ID file common name and the person record firstname/lastname) should actually be the same, but in case they aren't, we check that both exist.
[ Next ]
|
|
-- 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 --
Six Great Tools for IBM Lotus Sametime
- Encrypted and secure, browser-based, persistent chat rooms
- Complete chat logging and auditing
- Easy-to-define IM help desk queues
- Manage buddy lists across any organization
- Integrate awareness into Microsoft Outlook
- High powered, rapid bot development tools
Visit Instant Tech for free trials and more information. |
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
|