Home > Domino Tips > Administrator > Address Book > Verify Nab Group Members To Gab
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ADDRESS BOOK

Verify Nab Group Members To Gab


Tony Price
06.14.2000
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Hard time keeping your NAB Group members in sync with actual users?
This script runs through each NAB Group member and verifies it to the Global
Address Book. It adds the "not found" members to a field called "BadNames",
which you must create on the Group form in the NAB (editable, text). It then
sends a memo to whoever is listed at the end of the script, identifying the
Groups containing BadNames and adds a doclink for each.
Change GAB Replica ID, Search (if required) and addresses for the e-mail.

Code

Sub Initialize

Dim Session As New NotesSession
Dim db As notesdatabase
Dim doc As notesdocument
Dim Summary As Notesdocument
Dim Collection As NotesDocumentCollection
Dim CutOff As NotesDateTime
Dim BadNames As String
Dim n As Integer
Set cuffoff = New NotesDateTime("1901/01/01")

nablookup:
Dim dbNAB As New NotesDatabase ( "","")
Dim dbNABGroup As NotesDatabase
Set dbNABGroup = session.CurrentDatabase
' **** Set the name of the GAB database ****
' **** Replace XXXX with rep ID ****
Call dbNab.OpenByReplicaID( "", "XXXX")

Dim viewNAB As NotesView
Dim viewNabGroup As Notesview
Set viewNAB = dbNAB.GetView("($VIMPeople)")
Set viewNABGroup = dbNABGroup.GetView("($VIMGroups)")

okay:
Set db = Session.currentdatabase

' **** Select the collection of Group documents ****
Search$="FORM="+"""" +"Group"+""""
Print "Collecting The Groups"
Set Collection=db.search(Search$,CutOff,0)
Set doc = Collection.getfirstdocument

While Not (doc Is Nothing)
n=0
doc.BadNames = ""
Call doc.Save(False, True)

' **** Pull Member name, one at a time, and verify to the GAB

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Address Book
Formula language button manages Deny Access list searches
Find a Lotus Notes user within NAB Deny Access groups
Synchronize LinkedIn contacts with Lotus Notes Domino
How to correct Lotus Notes public key mismatches in four easy steps
Creating a Lotus Notes Personal Address Book replica
Admin user unable to create NAB
@Transform formula for use in R6
Change NAB while maintaining integrity of documents
NAB: A key piece of the Domino administration puzzle
Build an extended directory catalog

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


****
Forall members In doc.members
Dim NameText As New NotesName(doc.Members(n))
' **** Look for Non Groups ***
Dim subString As String
subString$ = Right$(NameText.Abbreviated, 13)
' **** change XXXX as per your mail
If subString$ = "XXXX" Then
Set docNAB = viewNAB.GetDocumentByKey(NameText.Abbreviated)

' **** If no entry in GAB Name view, add name to BadNames
in the Group doc ****
If docNAB Is Nothing Then
Print doc.Members(n) & " not located in GAB"
Dim item As NotesItem
Set item= doc.GetFirstItem("BadNames")
Call item.AppendToTextList(doc.Members(n))
Call doc.Save(False, True)
End If
End If
' **** change XXXX as per your mail
If subString$ <> "XXXX" Then
Set docNAB = viewNABGroup.GetDocumentByKey(NameText.Common)

' **** If no entry in NAB Group view, add name to BadNames
in the Group doc ****
If docNAB Is Nothing Then
Print doc.Members(n) & " not located in NAB"
Set item= doc.GetFirstItem("BadNames")
Call item.AppendToTextList(doc.Members(n))
Call doc.Save(False, True)
End If
End If


n=n+1
End Forall

' **** Go to next document in collection ****
Set doc=Collection.GetNextDocument(doc)
Wend

newsletter:
Dim dc As NotesDocumentCollection
Dim news As NotesNewsletter

' **** Select the collection of all Group docs with Bad Names ****
Search$="FORM="+""""+"Group"+""""+" & BadNames<>"+""""+""""
Print "Collecting The BAD Groups"
Set dc=db.search(Search$,CutOff,0)

' **** Create the newsletter on the Summary form with doclinks ****
Set news = New NotesNewsletter(dc)
news.SubjectItemName = "ListName"
news.DoSubject = True

Set doc = news.FormatMsgWithDoclinks( db )
doc.Form = "Summary"
' **** Change Addressee(s) below as required, either individuals or a
group****
Call doc.Send(True, "ADMINISTRATORS")
Call doc.Send(True, "Tony Price/GroupSvc/USERS/TDGROUP")
End Sub

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts