Getting Lower Level Members From A Nested Group

Use the following function to fetch all lower level members(all people) from a
nested group in Names & Address Book.
Function GetMembersinGroup(GroupName As String) As Variant
Dim session As New NotesSession
Dim db As New NotesDatabase("Servernamet", "Names.NSF")
Dim doc As NotesDocument
Dim view As NotesView
Set view=Db.GetView("($VIMGroups)")
Set doc=View.GetDocumentByKey(GroupName)
Redim tmpMembers(1) As Variant
J=0

If Not(doc Is Nothing) Then
tmpGroupName1=Doc.GetItemValue("Members")
GroupLowerBound1= Lbound(tmpGroupNam1)
GroupUpperBound1= Ubound(tmpGroupName1)
For i=GroupLowerBound1 To GroupUpperBound1
tmpGroupName2= GetMembersinGroup(tmpGroupName1(i))
GroupLowerBound2= Lbound(tmpGroupName2)
GroupUpperBound2= Ubound(tmpGroupName2)
Redim Preserve tmpMembers(GroupUpperBound2+J) As Variant
For K= GroupLowerBound2 To GroupUpperBound2
tmpMembers(J) = tmpGroupName2(K)
J=J+1
Next
Next
Else
Redim tmpMembers(0) As Variant
tmpMembers(0) = GroupName
End If

GetMembersinGroup= tmpMembers
End Function
This was last published in November 2000

Dig Deeper on Domino Resources - Part 7

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close