Hi there,
Just an inquiry, Where can I find my User Profile?
I was wondering if it would contain the following information:
Phone Number, Department etc.
Is it possible to generate fields for Phone Number, Department based on your User profile?
Any response to this inquiry is greatly appreciated.
Subject: RE: User Profile on Lotus Notes
Yes.
Here is a segment of code to look up someone’s phone number, e-mail address, employee number and Manager.
For this example you don’t need to break up @DBName in ServerName and DBPathName - but I did it for other reasons at the time:
ServerName := @Subset(@DbName;1);
DBPathName:= @Subset(@DbName;-1);
NABDBName := “names.nsf”;
result:=@DbLookup(“”:“”;ServerName:NABDBName;“($NamesFieldLookUp)”;@Name([Abbreviate];TravelerName);“OfficePhoneNumber”);
FIELD Travelerphone := @If(@IsError(result)|result=“”;“(Not found)”;@Subset(result;1));
FIELD EMAIL := @Name([Abbreviate];travelerName);
result:=@DbLookup(“”:“”;ServerName:NABDBName;“($NamesFieldLookUp)”;@Name([Abbreviate];TravelerName);“EmployeeID”);
FIELD EmployeeNumber := @If(@IsError(result)|result=“”;“(Not found)”;@Subset(result;1));
result:=@DbLookup(“”:“”;ServerName:NABDBName;“($NamesFieldLookUp)”;@Name([Abbreviate];TravelerName);“Manager”);
FIELD Manager := @If(@IsError(result)|result=“”;“(Not found)”;@Subset(result;1));
Subject: RE: User Profile on Lotus Notes
Thanks!!!
So if I had a text field called “phone” and inserted a code like this as default, when the user that opens the form … the phone number will be displayed based on the information in the domino directory personal profile?
Subject: RE: User Profile on Lotus Notes
Yes - IF the phone number field is filled in on the address book and if the persons name is located in the address book on the server they are connect to. I’m use names.nsf - on the same server they are accessing the application on.
Therefore if they are using a local replica of a database, it will go to their personal address book and they may not have their name in their personal address book.
The default formula would be for phone:
ServerName := @Subset(@DbName;1);
DBPathName:= @Subset(@DbName;-1);
NABDBName := “names.nsf”;
result:=@DbLookup(“”:“”;ServerName:NABDBName;“($NamesFieldLookUp)”;@Name([Abbreviate];@UserName);“OfficePhoneNumber”);
@If(@IsError(result)|result=“”;“(Not found)”;@Subset(result;1));
Note I’m just returning the FIRST phone number from OfficePhoneNumber. You could remove the @Subset and just return the result of result.
@If(@IsError(result)|result=“”;“(Not found)”;result);
Subject: RE: User Profile on Lotus Notes
Thanks again Stephen! 
Subject: User Profile on Lotus Notes
User Profile? How about Person Document? which has the fields you require.
Subject: RE: User Profile on Lotus Notes
I guess Person Document? Where Can I see my own?
Subject: RE: User Profile on Lotus Notes
The Domino Directory, People view. Check with your Lotus Notes admin.
Subject: RE: User Profile on Lotus Notes
Okay, I found it! Thanks!
Since we can use this formula @Name ([CN];@UserName) for names, can we get info from the personal document in the domino directory? Example: Phone number? etc.