|
|
|
|
|
|
|
|
|
|
|
|
|
|
Who's on your ACL? (continued)
If there's one LotusScript concept I've really had to hammer into my head, it's arrays and how they work. But the pounding has paid off because the power of being able to create, populate and then manipulate the data in arrays has really been the key to most of the more powerful applications I've created.
I strongly recommend you stock up on the headache medicines and make arrays second nature.
Work those arrays Now that you have seven different arrays that each contain names that may or may not be group names, it's time to go through the elements of each of the arrays one by one and see if any match group names in your PNAB. If the entry is indeed a group, we'll use the LotusScript rich text commands to write the name of the group and then print below it all of the members of that group. Since a little formatting goes a long way to making a document easier to read and understand, we'll make the most of the rich text creation features of LotusScript to indent (with two tabs) the list of all of the members of a group.
Below you can find the code that goes through the array of ACL entries with an access level of Manager and searches the "Groups" view of the PNAB to determine if the entry is a group. If it is a group it will return the values in the Members field. There is almost identical code for each of the other six access levels.
'--MANAGER LEVEL
Dim managerNames() As String
Dim k As Integer '-Only needs to be dimmed once at Manager level
k = 0
Dim managerRT As New NotesRichTextItem(doc, "ManagerReport")
Forall manager In managerArray
Set groupDoc = groupView.GetDocumentByKey(manager)
'--Note: Always check the return value to be sure the document exists
If groupDoc Is Nothing Then
Else
Call managerRT.AppendText(manager)
Call managerRT.AddNewLine(1)
Dim i As Integer '-Only needs to be dimmed once at the Manager level
i = 0
For i = 0 To Ubound(groupDoc.Members)
Redim Preserve managerNames(k)
managerNames(k) = groupDoc.Members(i)
Call managerRT.AddTab(2)
Call managerRT.AppendText(groupDoc.Members(i))
Call managerRT.AddNewLine(1)
k = k + 1
Next i
Call managerRT.AddNewLine(1)
End If
End Forall
|
Other uses You can modify this agent for many other purposes that can really help you keep on top of either your database ACLs or the member groups in the PNAB. Here are some additional ideas as to how you can modify this agent for other purposes:
- Modify the agent to go out and get a list of pre-defined (or user-defined through InputBoxes) group names and return a report showing who is currently a member of those groups.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.
The many included activities and demos will make you a pro! Expert instructor help is a click away.
Click here to try a FREE demo course!! |
-- Advertisement --
Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino
- Don't spend unproductive time maintaining different versions of the same spreadsheet
- Preserve data integrity and security in multi-user environments
- Create reports in minutes INSIDE Notes
- Get freedom from iterative report requests, deliver self-serve capabilities
Experience Reporting, Dashboards, and Analysis INSIDE Notes.
Try IntelliPRINT NOW! |
|
|
|
|
|
|
|
|
|
|