Manage Learn to apply best practices and optimize your operations.

Checking If The User Is A Member Of A Group And Adding The Group To The Readers Field

Checks if the user is a member of a Group in the address book and adds the
group to the Readers field, to allow access to all the group to the document
the reader submitted.
Sub Initialize
Dim ses As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim prfdoc As NotesDocument
Dim Source As NotesDocument
Dim dbcurrent As NotesDatabase
Dim user As String
Dim item As NotesItem

Set db = New NotesDatabase( "", "" )
Call db.Open( "Domino1/Vocaltec_Comm", "names.nsf" )
Set view = db.GetView("Groups")
Set doc = View.GetFirstDocument
Set Source=ses.DocumentContext
Set db2 = ses.currentdatabase

user= source.GetItemValue("BReportBy")(0)

Do While Not(doc Is Nothing)

If doc.ListName(0) = "IT" Then
Ok = "No"
Forall m In doc.members
If m = user Then
Ok = "Yes"
End If

End Forall
End If

Set doc = view.GetNextDocument(doc)


If Ok = "Yes" Then
Call Source.ReplaceItemValue( "Member", "MIS")
Set item = Source.GetFirstItem("Readers")
Call item.AppendToTextList("MIS")
Call (True,False)

End If

End Sub

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials'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 ...