Getting the list of users belonging to a group

There is not a method in lotusccript to get the list of all users belonging to a group, and to complicate matters, groups can contain other groups as members.
To solve this problem I wrote getUsersByGroup function that returns the list of users belonging to a group, provided that:

  • the public names.nsf is accessible
  • users have a document “Person” in the public address book
  • groups are defined in the names
  • the maximum number of nested groups is 100, but you can change this setting changing the variable maxNestedGroup


I think that the function getUsersByGroup is also an example of a recursive function that uses the method Static to avoid to define the same variables more times .
The variable incrementIndex defines the increase in the index of the matrix usersTempList when you reach the limit.
The getUsersByGroup function returns a variant containing a string array whose elements are the users in the format [Firstname Lastname] / [domain] / [Country]

One Reply to “Getting the list of users belonging to a group”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.