Search DominoPower's 11,441 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.
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.


1  ·  2  ·  3  ·  4  ·  5  ·  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
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> 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 --

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 --

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