Manage Learn to apply best practices and optimize your operations.

Separate First Name, Last Name and Middle Initial

Code will take the user name and separate the First Name, Last Name and Middle Initial to be used for searching the Address book or other views.

user_name = Evaluate("@Name([CN];@UserName)")
len_all_name = Len(user_name(0))
pos_first_name = Instr(user_name(0)," ")
first_name = Left(user_name(0),pos_first_name - 1)
last_name = Right(user_name(0),len_all_name - pos_first_name)
pos_middle = Instr(last_name," ")
If pos_middle <> 0 Then
mid_name = Left(last_name,pos_middle -1)
first_name = first_name & " " & mid_name
pos_all_last = Len(last_name)
last_name = Right(last_name,pos_all_last - pos_middle)
End If

Dig Deeper on Domino Resources - Part 6

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...