I have a script to mass import users into a web user address book from an excel spreadsheet. On import I need to check our primary dom dir and one or more secondary dom dirs for any existing users with the same name to avoid duplicates. What is the best, fastest and most efficient way to accomplish the lookups? db.search? GetDocumentByKey on $Users? GetEntryByKey on $Users? NotesDocumentCollection? NotesViewEntryCollection? Evaluate(@DbLookup)? Evaluate(@NameLookup), something else? Each user will have 3 names that need to be looked up:
I know I could create a dircat of all dom dirs to give me 1 place to do the lookups but, depending on where the file comes from, not all dom dirs will be queried for lookups. I will have control documents telling me which dom dir(s) I need to check for dups.
from what I understand, NotesDirectory does not have a way to limit which directories to search. If I am importing users in Europe I only want to check our 3 Europe address books for duplicates but if I am importing user in Asia I only want to check our 4 Asia address books for duplicates.
Subject: Not sure I understand why it’s OK to have duplicate names in different geographies
…if they are still in address books which are considered directories by the same server. But, if you decide you must search specific NSFs, then see Searching for documents.