Hi All,I have a agent which get ACL list of database, I need names of from ACL who are of type person and having manager access, So I created the agent accordingly,
Now the issue is, I want to save these (Multiple) names in a text field, I am finding it difficult to store multiple names as array in text field.
My Code :
Sub Initialize
On Error Goto errHandler
Dim session As New NotesSession
Dim db As NotesDatabase
Dim db2 As NotesDatabase
Dim doc As NotesDocument
Dim view As NotesView
Dim ctr As Integer
Dim AclCtr As Integer
Dim dbname, bpath,server As String
Dim sessionMgr As New NotesSession
Dim acl As NotesACL
Dim aclentry As NotesACLEntry
Dim nam As NotesName
Dim ss As String
Dim x() As String
Set db = session.CurrentDatabase
Set view = db.GetView("vwAll")
Set doc = view.GetFirstDocument
ctr = 0
Do While Not (doc Is Nothing)
AclCtr = 0
dbpath = Cstr(doc.txtPath(0))
server = Cstr(doc.txtAppOnServer(0))
Set dbm = session.GetDatabase(server,dbpath,False)
Set acl = dbm.ACL
Set aclentry = acl.GetFirstEntry
If (ctr > 3) Then
Exit Do
End If
Do While Not aclentry Is Nothing
If (aclentry.Level = 6) Then
If(aclentry.Isperson) Then
If (Instr(aclentry.Name,"Local")) Or (Instr(aclentry.Name,"#") Or (aclentry.Name = "TasmanTemplateManagers") Or (Instr(Lcase(aclentry.Name),"server"))) Then
Goto nextAclList
End If
Set nam = sessionMgr.Createname(aclentry.Name)
ss = nam.Common
Msgbox "manager is "+aclentry.Name,64, dbm.Title
' *******************************************************************
' I want to save the acl name list here,
' there are more than one manager in every database
'********************************************************************
AclCtr = AclCtr + 1
End If
End If
nextAclList:
Set aclentry = acl.Getnextentry(aclentry)
Loop
ctr = ctr + 1
Set doc = view.GetNextDocument(doc)
Loop
Exit Sub
errHandler:
Msgbox "Initialize Error on Line >>>>>>>>>>> " + Cstr(Erl) + ":" + Chr(10) +Cstr(Error$)
End Sub
Please guide me
Thanks in Advance