Checking groups usin LotusScript

  • 21 Oct, 2010

Often occurs with the removal of a user and her name stay in groups.
I created a simple agent to list groups with this kind of member.
The abent above is simple and can be improved.

Sub Initialize
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim docUser As NotesDocument
Dim viewGroup As NotesView
Dim viewPeople As Notesview
Dim ses As New NotesSession
Dim members As NotesItem
Dim UserName As NotesName
Dim fileNum As Integer
Dim fileName As String
Set db = ses.currentdatabase
Set viewGroup = db.getview( “$VIMGroups”)
Set viewPeople = db.getview( “$VIMPeople”)
Set doc = viewGroup.getfirstdocument
        fileNum% = FreeFile()
        fileName$ = “c:group.txt”
Open fileName$ For Output As fileNum%
While Not doc Is Nothing
If doc.members( 0)<> “” then
Set members = doc.getfirstitem( “members”)
ForAll v In members.Values
Set UserName = New NotesName( v)
Set docuser  = viewpeople.getdocumentbykey(username.abbreviated, True)
if docuser Is Nothing then
Print #fileNum%,UserName.Abbreviated & “,” & doc.ListName( 0)
End if
End ForAll
End if
Set doc = viewGroup.getnextdocument(doc)                
Wend
Close fileNum%
End Sub

Searching for detais about an adminp process api documentation, i found an article on DeveloperWorks about a more improved tool to manage groups. I don’t have time to test or learn the functions but the article is here . The code of this article was on the dead SandBox, but you can search and download using this link

Related Posts

Migrating messages from Domino to Google using IMAP

  • 20 Feb, 2022

It's only for messages. No calendar migration Imapsync command is a tool allowing incremental and recursive imap transfers from one mailbox to another. If you don't understand the previous sentence,

Migrating messages from Domino to Google using IMAPRead More

Domino V12 and Verse 2.1 How to add a Photo URL

  • 08 Jun, 2021

Today i setup a Domino V12 server just for test some new features. A customer ask to use photos on Verse hosting photos on Domino. Domino V12 comes with Verse 2.0. I just download the version 2.1 of

Domino V12 and Verse 2.1 How to add a Photo URLRead More

Notes / Domino is forever

  • 04 Feb, 2021

Yesterday it seemed like it would be an ordinary working day but a client called me informing about the expiration of a certifier. It would be normal to resolve the problem with the re-certification p

Notes / Domino is foreverRead More