Link to home
Start Free TrialLog in
Avatar of fdemello
fdemelloFlag for United States of America

asked on

Lotus Notes - Initials From Name Field

Hello,
I am having trouble getting any output (returns an empty field) out of this formula no matter what I try:

 
 @Name([I];ReqAuthor_1) 

Open in new window


I have attached the field I am trying to convert to Initials.  Is that the problem?


Can you tell me the field set-up parameters?  I have tried as Editable, C, CWC, etc.  No errors but no output.

Thanks in advance
Name-Field.png
Avatar of doninja
doninja
Flag of United Kingdom of Great Britain and Northern Ireland image

Make sure your formula is working on a saved document or exists on the form after the ReqAuthour_1 field so that it has been calculated already.

Get your formula to just return the whole field content just to make sure it is not blank at the time you are running this.
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
The name field do not contain the initials.

You have to look up the initials in the Name ans Address Book
RE: "You have to look up the initials in the Name ans Address Book".

Errr, no you don't.  See my example above.  Why would you make an unnecessary look-up to the Domino Directory when the name is already on the form?  Besides, even if you did look-up to the directory, I'd like to know where would you get the initials?
The fiels ShortName in the person document contains the Initials/Shortname and sometimes the internet address. It can be at multi value field.

My name is CN=Hans Holt/CO=Support/O=Convergens/C=DK but my initials are hha - taht is only read in the Name and Address Book.
I see.  But then you would have to set this up for every user manually and make sure that it stays up to date.  That seems like a lot of work for something so easy.
Well thats how it is defined in the Name and Address Book. Name and initials are two different values, that are set individually.
Avatar of Sjef Bosman
There is this example in the Help database:

Sub Initialize
  Dim session As New NotesSession
  Dim nam As NotesName
  REM Create a hierarchical name
  Set nam = session.CreateName( _
  "CN=John B Goode/OU=Sales/OU=East/O=Acme/C=US/S=Goode/G=John/I=B")
  REM Returns "B"
  Messagebox nam.Initials,, "Initials"
End Sub

The initial assumption is wrong: @Name([ I]; ...) does not convert to initials, it extracts the initials component from a hierarchical name. Since the N&A book doesn't provide Initials, there is no such component in the hierarchical name as used by Notes. An LDAP string might contain them.

Hope this explains why you have to find some other way to get your initials.

By the way, what initials would you expect from a person called John Rhys-Davis, Douglas McArthur, and Peter O'Toole? There is no easy formula you can use to get someone's initials. You migth add them to the N&A book, of course, so you can @Look them Up, but they will never be part of the hierarchical Notes name.
Ah, sorry, there is indeed a field Initials in the N&A book, I got that part wrong. Still, the formula only returns what's in the hierarchical name, and AFAIK Notes doesn't support the Initials component in a hierarchical Notes name. I'll do a test to make sure...
Avatar of fdemello

ASKER

Thank you for the help guys.  Appreciate it
Thank you very much Bill.