|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 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 --
Integrate your Notes Applications with Microsoft Office and Symphony
Integra for Notes Integrates Microsoft Office and/or IBM Lotus Symphony
Requires NO change to the design of the appliation or Installations of DLL's and EXE's
- Integra is a ready to use solution, enhance static reports with Excel data analysis, pivot tables, macros
- User friendly aproach, using a point and click access to features
- Reports from any Lotus Notes databases
- Runs reports through a Notes client, web browser and scheduled basis
- Allows use of LotusScript for advanced data manipulation
- Enables self service reporting capabilities to end-users
Learn more at www.integra4notes.com. |
|
|
|
|
|
|
|
|
|
|