Manage Learn to apply best practices and optimize your operations.

Count the group members

Here's how to count the number of users in a group.

Ever wonder how to find out how many users are there in a group and when to create a new group? This is very useful to stop over loading a single group and stick to uniform group size. This was created as an action button in groups for Admins.


Sub Initialize
	
	' This agent is to count the members in a given group .. 
	Dim session As New NotesSession
	Dim db As NotesDatabase
	Dim collection As NotesDocumentCollection
	Dim doc As NotesDocument
	Dim item As NotesItem
	Dim msg As String
	Dim grp As Variant
	
	Set db = session.CurrentDatabase
	Set collection = db.UnprocessedDocuments
	Set doc = Collection.GetFirstDocument
	grp =doc.GetItemValue("ListName")    
	Set Item = doc.GetFirstItem("Members")
	Forall x In Item.Values
		count = count+1
		
	End Forall
	If count =>250 Then
		msg = " This group - "&grp(0)+"  - has  "&count+" members."& Chr(10) &Chr(10)& " Create a new group for further entries."		
		Messagebox msg, MB_OK+16, "Group Member Count"
					
	Else
		msg = "This group - "&grp(0)+" - has "&count+" members."
		Messagebox msg, MB_OK+48, "Group Member Count"
		
			End If
	
End Sub

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

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 ...

SearchDataCenter

SearchContentManagement

Close