Manage Learn to apply best practices and optimize your operations.

Extract Names From Group

Extract all the names from the Lotus notes group names using Recursive
Using this function:

Let NameField and ResultNames be the two field in the UIDocument.
Property: NameField (Editable, names, Multivalid, ....) ------- Input
names ( will contains Person name and also Group name)
ResultNames ( Computed , Names, Multivalied, supprated by , ;
) - ---- Output ( will only have Person name)
To remove the duplication in that field use the value as

Print "Extracting names from Address Book.........."
Dim allnames as string
allnames = ""
Forall nam In source.document.Namefield
Call ExtractNames( "DominoChennai" , "names.nsf" , Trim(nam) ,
End Forall
source.document.ResultNames = allnames

Function ExtractNames( MailServer As String , MailDb As String , Byval InName
As String , OutName As String) As String

' This recursive function will Extract all names from the LotusNotes Group
'and return the string of type "name1;name2;name3;name4....".
' The result will be stored in the Parameter "OutName"
' Also if Groupname is not found in the address book returns the same
input value
' Note : This will take care of nested groups also. But the output may
contains duplicate names (can be removed)

' Note: We are not checking that the Server and the address book is correct are
not , since if code is written for that , then
' that set of code will be executed for all the looping of the recursive
function which will increase the performance time
' Check if the name is in the Group view in the given address book
mem = Evaluate(|l1 := @DbLookup("":"NoCache";"|+ MailServer +|" : "|+
MailDb +|" ; "($VIMGroups)" ; "|+ InName +|" ; 3 ) ; @If(@IsError(l1) ; "" ;

If mem(0) <> "" Then
Forall nam2 In mem
t1$ = ExtractNames(MailServer, MailDB , nam2 , OutName)
OutName = OutName + ";" + t1$
End Forall
If OutName = "" Then
OutName = InName
OutName = OutName + ";" + InName
End If
ExtractNames = InName
End If

End Function

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 ...