I am not sure if this is an issue with evaluate or just my plain unfamiliarity with getting functions to work properly with Evaluate.
Here is the scenario.
I have 4 levels of approvers with 1 name in each of 4 fields DS_Email_1 thru _4
Names are foramtted as simiar to Angel Liccia/TRISTATE/ORGNAME
I need to convert all 4 fileds to Cananical form.
I wanted to run an agent to do this and was working on a shared script since I will be doing this a lot.
The problem is that all I get back is an empty string.
I would appreciate any help quickly, as this is holding back some important projects.
Thanks in advance
R 6.54 and R 6.55 patched
Sub LU_Namefixup(vw_name As String ,col As Integer ,fld_name As String )
' convert to Canonical form for WFS fields - Can not change primary sort key of view reliably
' go through view and update fields
' Sample Evaludae that works ' mem = Evaluate(|s1 := @DbLookup("":"NoCache";"" ; "JC_LU1" ; "|+ iTempPrice +|" ;fld_name ) ; @If(@IsError(s1) ; "" ; @trim(s1))|)
Dim sess As New NotesSession
' @NameLookup([Exhaustive];"Angela Liccia/TRISTATE/ORGNAME";"FullName") ' Works as a function
Set db = sess.CurrentDatabase
Set view = db.GetView(vw_name )
Set doc = view.GetFirstDocument
While Not doc Is Nothing
' Fix names - convert to canonical
strLU = doc.GetItemValue(fld_name)
retlist = Evaluate(|@NameLookup([Exhaustive];strLU ;"FullName")|,doc) ' test without error checking ? with or without doc, still blank
' retlist = Evaluate(|s1 := @NameLookup([Exhaustive];strLU ;"FullName") ; @If(@IsError(s1) ; "" ; @trim(s1))|) ' returns blank
' Non sorted field, so it can be changed
Call doc.ReplaceItemValue(fld_name , retlist )
Set doc = view.GetNextDocument(doc)