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 first published in November 2000

Dig deeper on Domino Resources - Part 7

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchWinIT

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

SearchVirtualDataCentre.co.uk

Close