Link to home
Start Free TrialLog in
Avatar of Sam654
Sam654Flag for Australia

asked on

How to lookup a users email address in a Notes Application

Writing a little app and I want to lookup a users email address from the NAB. Don't have designer access to the NAB. From memory it's either $VIMPeople or $Users that are best too lookup to and should the key (users name) be hierachical or abbreviated?

Thanks
Avatar of CRAK
CRAK
Flag of Netherlands image

If you open the addressbook using CTRL + SHIFT + View > Goto, you can access the views. I have always preferred "($Users)" over "($VIMPeople)" as it contains a number of name.
Mind that you can always create a local copy (without ACL) of the NAB to checkout the design, or use (a copy of) the template for that purpose!

Another approach is the use of @MailDbName, or notesRegistration.GetUserInfo(). It's best to check designer help on the latter!
You can use the LS function (that gets user's document from NAB) from my comment here:

https://www.experts-exchange.com/questions/25581063/Get-email-address-from-full-name-by-lotusscript.html
I prefer using ($Users) since you can look-up by first name, last name, email address, full name, short name, abbreviated name, or common name.
Avatar of Sam654

ASKER

If I was to use the formula @MailDbName to get the users mail file, how could I then get the users email address?
ASKER CERTIFIED SOLUTION
Avatar of Bill-Hanson
Bill-Hanson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry... That should have been "info about the user's mail database, NOT the Domino Directory".
The connection between mail db and e-mail is the user document in Name and Address book (names.nsf).
Since you're using @MailDbName, which gets the mail db of the currently logged-in user, I suggest you use the function I mentioned, cuz' it gets currently logged-in user's document in NAB.

Then get the e-mail from the document it returns, as it is explained bellow the function.

Nevertheless, if you have additional questions, ask...
Ups, I haven't seen those last three comments before posting.
So, yes, if you're using only formulas, that is simpler way to go.
Avatar of Sam654

ASKER

Nice, didn't know about that @Function and like it. Unfortunalty I'm not able to use it and have opened another question detailing why etc. Will be using Lotus Script for this next bit. Link to new question below.

https://www.experts-exchange.com/questions/26632680/Lookup-Email-from-NAB-using-first-name-and-last-name-ONLY.html