How to list members of a group in Domino Directory

10 pts.
Tags:
Domino Designer
Lotus Agents
LotusScript
NAB
Is there a way to get members of a group, in corporate names.nsf on screen or, for example, in txt file with LotusScript agent or something similar? In domino directory we have a lot of group with many members and nested group in it, and I try to write agent who's purpose is to list groups, which will be given as parameters to agent, (for example) by alphabet and related members and nested groups. Please help. Dalibor

Answer Wiki

Thanks. We'll let you know when a new response is added.

The quickest way to see the members of a group is to compose a memo (e.g. by Ctrl+M), type the group name in the To field, then right-click the name and ask to see “Name details.” This opens the group document in a modal window. This might only work for mail groups. This is also a good way to get information about users. However, it doesn’t let you copy the names, and if there are subgroups, you can’t see who’s in them.

Otherwise, the Domino Directory is a Notes application (or multiple Notes applications, if you set it up that way). You can open the application, go to the Groups view, and search for the group you want. Again, if there are nested groups you would have to track them down manually.

To display a report of a Notes group’s entire membership, you would need to scan down the group’s members and do a search of each one to determine which are themselves groups and which are users. There are two pieces of code that could be combined to implement this.

The first is described in the Lotus developerWorks article <a href=”http://www-106.ibm.com/developerworks/lotus/library/ls-groups/index.html”>Working with groups in LotusScript</a>, which also contains a link to reusable code you can download. This is a set of classes for working with groups generally, which should let you pull out the information you want with about 15 lines of code.

The other thing you need is a way to report the results. The <a href=”http://www.openntf.org/Projects/codebin/codebin.nsf/CodeByDate/84F37FE2DB46E185862572FD006D5428″>ReportGenerator class</a> on openntf.org should be helpful.

You can add the following view to your Names.nsf
-
- Selection Formula:
-
- SELECT Type = “Group” | Form = “Person” | Form = “Server”;
-
- Form Formula:
-
- @If(Form = “Person”; @If(@TextToNumber(@Version) < 166; “(46Person)”; Form);
- @If(@TextToNumber(@Version) < 166; “(46Group)”; Form));
-
- Column Number 1
-
- Column Formula:
-
- val := @If(Form = “Person”; @Name(<sq bracket>Abbreviate<sq bracket>; @Subset(Fullname; 1));
- Form = “Server”; @Name(<sq bracket>Abbreviate<sq bracket>; ServerName);
- @Name(<sq bracket>Abbreviate<sq bracket>; Members));
- @If(val = “”; “~ The following Groups do not have members ~”; val);
-
- Sorting:
-
- Ascending, Categorized
-
- Column Number 2
-
- Column Formula:
-
- @If(Form = “Person”; 3; Form = “Server”; 52; 4);
-
- Icon:
-
- Yes
-
- Column Number 3
-
- Column Title:
-
- is a member of
-
- Column Formula:
-
- groupName := @Name(<sq bracket>Abbreviate<sq bracket>;
- @Subset(ListName; 1));personName := @Char(0) + “… ” + @If(Title != “”; Title + ” “; “”) +
- @If(Firstname != “”; @Trim(@Subset(Firstname; 1)) + ” “; “”) + @If(MiddleInitial != “”;
- @Trim(@Subset(MiddleInitial; 1)) + ” “; “”) +
- @Trim(@Subset(Lastname; 1));svrName := @Char(0) + “— ” +
- @Name(<sq bracket>Abbreviate<sq bracket>; ServerName);
- @If(Form = “Person”; personName; Form = “Server”; svrName; groupName);
-
- Column Number 4
-
- Column Title:
-
- Description
-
- Column Formula:
-
- ListDescription

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
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

Forgot Password

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

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
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

Thanks! We'll email you when relevant content is added and updated.

Following