Worklogging on Lotus Domino

Problems faced and soultions ! keep yourself away, if technology bites !

My Photo
Name:
Location: Bangalore, India

some one who thinks life as a learning experience

Friday, October 14, 2005

To find out the Group members of an NAB group

Input – Group Name
Return Value – Variant, array of Members

Lotus Script

Sub getGroupMembers(grpName As String)

Dim Server As Variant
Server="citxn30000.cit.cummins.com"

Dim addBook As New NotesDatabase(Server,"Names.nsf")
Dim View As NotesView
Dim doc As NotesDocument
Dim grpMembers As Variant

Set View=addBook.GetView("Groups")
Set doc=View.GetDocumentByKey(grpName)
grpMembers=doc.Members
End Sub

Formula:

The following will return members of group "GroupName" into the variable "GroupMembers".

GroupName := "Name of the Group";
server := "AddressBookServer/YourDomain";
db := "names.nsf";
view := "Groups";
GroupMembers := @Name([CN]; @DbLookup(""; server : db; view; GroupName; "Members"));

0 Comments:

Post a Comment

<< Home