Searching the NAB

how do i search the NAB for a person document using EmployeeID?? i have a sample of code (a function within an agent) that finds a person document in the NAB using the username.i have tried to modify that code to find the person using EmployeeID, but I’m unsuccessful so far. i don’t understand the syntax.

the code i’m trying to copy from follows:

Function GetPersonDocument (Byval personName As String, nab As NotesDatabase) As NotesDocument

Dim coll As NotesDocumentCollection

Dim search As String



search$ = "Form = ""Person"" & @LowerCase(FullName) = """ + Lcase$(personName) + """"

Set coll = nab.Search(search$, Nothing, 0)



Set GetPersonDocument = coll.GetFirstDocument

End Function

how would I modify this function??

Subject: searching the NAB

the most effective way would be to have a new view in the Domino Directory that sorts all people by EMployee ID.

dim view as NotesView

Set view = db.getView(“($EmpID)”)

dim doc as Notesdocument

set doc = view.getdocumentbyKey(myID)


Your way could also work (but slower, as no index will be used)

Dim search As String search$ = “Form = ““Person”” & EmployeeID = “”” + myEmpID + “”“”