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