Picklist & Canonical

Hi,

I am trying to set field “InitiatedBy” to the full name of the person selected. “Demo User/ABC/DEF”, etc.

But it only displays “Demo User” when the following script is run. I am 100% sure that the first value in the lookup column, containts the FULL name of the person. What am I doing wrong?


Sub selectName

Dim ws As New NotesUIWorkspace

Dim s As New NotesSession

Dim db As NotesDatabase

Dim uidoc As NotesUIDocument

Dim enqName As Variant

Dim enqNameNotes As NotesName

Dim enqDetails As Variant

Set db = s.CurrentDatabase

prompt$=“Please select the name of the Enquirer”

enqName = ws.PickListStrings(3, False, db.server, db, “LU View”, “Select Enquirer”, prompt$, 9, “”)

If Not Isempty(enqName) Then

     If enqName(0) <> "" Then

Set uidoc = ws.ComposeDocument( "", "", "ViewName" )

		

'----- RETURN STRING WITH  VALUES SEPERATED BY *.  EXPLODE TO ARRAY, ACCESS INDIVIDUALLY

enqDetails = Explode(enqName(0),"*")		

Set enqNameNotes = New NotesName(enqDetails(0))

Call uidoc.FieldSetText("InitiatedBy", enqNameNotes.Canonical)

Call uidoc.FieldSetText("Office", enqDetails(4))

Call uidoc.FieldSetText("Phone", enqDetails(2))

Call uidoc.FieldSetText("Fax", enqDetails(3))

Call uidoc.FieldSetText("Level", enqDetails(1))			

     End If

		

uidoc.Refresh  ***  I have even tried taking this out, just in case.

End If

End Sub

Subject: Picklist & Canonical

O, and the form which received the data, don’t have any field translations in which might change it.

Just thought I will put it in here in case someone points that out.

Subject: Picklist & Canonical

If enqDetails(0) contains a common name component only, that’s all that will be returned by enqNameNotes.Canonical. It doesn’t attempt to search for any user(s) with that common name, that might exist in an of the available address books.