|
|
|
|
|
|
|
|
|
|
|
|
|
|
Access list management system (continued)
ACLAddPersonAgent The next agent used adds a person to the list. Here's a brief description of all of the functions of ACLAddPersonAgent, and what each does.
Declarations
Be sure to look here to familiarize yourself with all of the different global variables that are used in this agent.
Options
The complete code for this section follows:
Option Public
'-Use script library to get essential function code
Use "ACL Agent Script Library"
|
Initialize
The Initialize Sub in this agent controls the flow of this agent and then prints out a short confirmation message upon success or an error message.
SetGlobalVariables
Be sure to customize this section based on the location of your key databases.
GetAddVariables
This agent parses the Query_String of the called agent to get the name to add to the access list and the access level. It's definitely a useful piece of code to use for extracting arguments passed to an agent through the Query_String. I know I'm going to reuse this code a lot.
Sub GetAddVariables
Dim queryString As String
queryString = note.Query_String(0)
Dim param1, param2, param1Name, param2Name As String
param1Name = "&addname="
param2Name = "&addlevel="
'--Get Value for Parameter 1
If Instr(Lcase(queryString), param1Name) > 0 Then
param1 = queryString
'--Cut off everything in the query string to the left of parameter 2
param1 = Mid(param1, Instr(param1, param1Name) + Len (param1Name))
'--Cut off everything to the right, if any
If Instr(param1, "&") > 0 Then
param1 = Left(param1, Instr(param1, "&") -1)
End If
Else
'--Bad Request Handler
Print {<body>}
Print {<H1>Bad Parameter 1</H1>}
Print {</body>}
End If
'--Get Value for Parameter 2
If Instr(Lcase(queryString), param2Name) > 0 Then
param2 = queryString
'--Cut off everything in the query string to the left of parameter 2
param2 = Mid(param2, Instr(param2, param2Name) + Len(param2Name))
'--Cut off everything to the right, if any
If Instr(param2,"&") > 0 Then
param2 = Left(param2, Instr(param2, "&") -1)
End If
Else
'--Bad Request Handler
Print {<body>}
Print {<H1>Bad Parameter 2</H1>}
Print {</body>}
End If
'--Get and set the delete name and the access level
addName = ReplaceSubstring(param1,"+"," ")
addLevel = param2
End Sub
|
AddToGroup
The absolute core of this agent is the following straightforward code in the AddToGroup sub that actually adds a person to the member field on a group document.
'--Add this person to this group
If Not (groupDoc Is Nothing) Then
Dim memberItem As NotesItem
Set memberItem = groupDoc.GetFirstItem("Members")
Call memberItem.AppendToTextList(addName)
Call groupDoc.Save(True, True)
success = "Yes"
Call ResortGroupDocument(groupName)
End If
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done.
Native to Lotus Domino. The User Experience unseen for Lotus Domino.
Do more with less. Really.
See the possibilities Docova unleashes for Lotus Domino. |
-- Advertisement --
Integrate your Notes Applications with Microsoft Office and Symphony
Integra for Notes Integrates Microsoft Office and/or IBM Lotus Symphony
Requires NO change to the design of the appliation or Installations of DLL's and EXE's
- Integra is a ready to use solution, enhance static reports with Excel data analysis, pivot tables, macros
- User friendly aproach, using a point and click access to features
- Reports from any Lotus Notes databases
- Runs reports through a Notes client, web browser and scheduled basis
- Allows use of LotusScript for advanced data manipulation
- Enables self service reporting capabilities to end-users
Learn more at www.integra4notes.com. |
|
|
|
|
|
|
|
|
|
|