This database allows you to capture and track information about documents.
Functions of the Database:
To add a document to this database
Select Create, Document.
You can enter document information in several ways: by typing it using the Notes editor, by scanning in hard copy, or by importing or attaching an electronic file.
To respond to a document
Highlight that document in a view, then select Create, Response.
To respond to a response
Highlight the response you wish to respond to, then select Create, Response to Response.
To flag a document as Private:
You can use the "Mark Private" and
"Mark Public" actions in the template to control whether anyone other than yourself can read a specific document. For example, if you have not completed the writing of a particular document, you can click the "Mark Private" action and others will not be able to see the document. When you complete the document, you can click the
"Mark Public"
action to make it available for others to read.
If a document is marked private after it has been submitted for review, the document author and the reviewers will be able to read the document.
Features
Document Review Cycle:
The author of a document has the option of setting up a document review cycle for that document. To do so simply click on the Setup Review Cycle action button and fill in the necessary information.
Note:
Do not use
@Domain
when entering approver names. Any domain added will be stripped off and may cause complications when attempting to route a request. Also, only enter Person-names as approvers. Group names are not supported.
Clearing a Review Cycle:
Document Library, SmartSuite 96 Library, and MS Office Library provides an action button to "Clear Review Cycle". This is accessible only by the document's originator. You can either use the action prior to submitting a document for review, or after submittal. Below are the guidelines:
o Clearing a review cycle prior to submitting for review: Select this if you, as originator, wish to change the review cycle settings before your reviewers receive notification.
o Clearing a review cycle after submittal: If reviewers have already begun or completed their document review, their work will be preserved. If reviewers were notified to review a document and they have not yet begun the review, they will receive a courtesy notice that they are no longer required to conduct a review.
Lotus SmartSuite Library Review Styles:
Serial Review:
Documents are routed for review one at a time, in sequence to the reviewers chosen by the author.
o All edits are made within the same document, but an unedited copy of the original document is also saved.
Serial Review (keep all revisions):
Documents are routed for review one at a time, in sequence to the reviewers chosen by the author.
o Edits are made within a copy of the original, which also includes all comments from previous reviewers
o All old versions become response documents (as well as a copy of the original)
Document Reservations:
Requests for document review are routed in parallel (that is, all at the same time). When one reviewer opens the document, a "file locking" occurs at the server which warns any other user who happens to edit the document that a review is in progress.
o Review comments or edits are made into a copy of the original document
o As with the others, a clean copy of the original is always kept
Response Review:
Same as Document Reservations (but with no file locking).
o Review comments or edits are saved as response documents to the original document.
o As with the others, a clean copy of the original is always kept
Processing Late Reviews:
If the Process Late Reviews agent is enabled, it selects those documents which are in review and have due dates which have passed. Based upon the review style of the document, it then either moves it along to the next reviewer, marks it as complete, or simply notifies the current reviewer(s) that their review is overdue.
Unlock Document:
Occasionally a document is accidentally left in a locked state. The Unlock Document action can be accessed by designers and managers from the Review Status view's Action menu to unlock the document.
Document Archiving:
This is a process by which certain documents are removed from the current database and stored in a different database. This keeps the library up-to-date with only the latest topics. Most of the Archiving activities take place from the "Archiving" view. You must switch to this view in order to initiate archiving on a library database.
To set up archiving on any library database, switch to the Archiving view and click the action called "Setup Archive". The Archive Profile appears. This document contains criteria that the user specifies for archiving topics in a library (e.g., inactive after 'x' days, or expired after 'x' days). The archive database is automatically created when the Profile is saved. The archival database filename is also specified in the Archive Profile; the title of the archive will be the title of the Lotus SmartSuite Library database followed by "(Archived)". After the archive criteria have been specified in the Archive Profile, other agents run on the database to move the document(s).
Mark/Unmark Document as Expired:
Marks a topic as "expired". If the Archive Profile specifies that
expired
topics should be archived, the document(s) marked with this agent would fall into that criterion. If a document is already marked as expired, this agent tells the user what the expire date was, and will ask if the user wants to un-expire it.
Periodic Archive:
Reviews the Archive Profile and moves documents which meet the archive criteria into the archive database. This agent is run automatically on the server; the schedule is set by the database manager/designer.
Troubleshooting:
User receives the following error: "Cannot launch OLE object: Form inconsistency or Application not installed. Contact Database Administrator."
Because this template is designed to work with SmartSuite 96 and Windows 95, users may receive this error when creating documents from a Windows 3.1 client or when using a previous release of SmartSuite. The database designer should modify the SmartSuite forms and change the Auto Launch setting in the Form properties InfoBox to reflect the Win 16 version of the SmartSuite software.
O=Lotus Notes
O=Lotus Notes
PURSAFO
|.:#U
O=Lotus Notes
CN=Lotus Notes Template Development/O=Lotus Notes
PURSAFO
Fde!f^^
$Info
$Body
Times New Roman
Task List
&Switch To
About SmartSuite Library
@ @@ @` @
@@ @@@@@`@@
`@ `@@`@``@
What does this database do?
A Document Library application is an electronic filing cabinet that stores reference documents for access by a workgroup. The database might contain anything from environmental impact statements for a group of engineers to financial statements for a group of loan officers. This Document Library template is designed to work with Lotus SmartSuite '96 applications. (It is not backward comaptible with previous versions of the Lotus SmartSuite).
Who will use this database?
Anyone who wishes to create a record of a document or review available documents may use this database.
Important Features
Review Cycle:
Used to route a document to a series of recipients.
Document Archiving:
Used to move expired documents to an archive database.
Suggestions for Modifications
Full text search:
If you wish to use Notes' full text search capabilities for a database created with this template, select menu File, Database, Properties, go to the Full Text panel and then select Create Index... to create the full text index.
Where to find more information?
- More information can be found by selecting Help, Using Database
Access Control
Very Important:
Access level should be
Author
for all users of this database. This will prevent unauthorized editing of documents within the database. The Author fields within the forms govern who will be able to edit/review particular documents. Errors will occur if someone with Editor access attempts to review a document when they are not an authorized reviewer of that document.
O=Lotus Notes
O=Lotus Notes
PURSAFO
|.:#U
O=Lotus Notes
CN=Lotus Notes Template Development/O=Lotus Notes
PURSAFO
Fde!f^^
$Info
$Body
Times New Roman
ReviewOptions
Review style:
ReviewStyle
ReviewStyle
Serial review | Serial.NoVersionsSerial (keep all revisions) | Serial.VersionsDocument reservations | Parallel.NoVersionsResponse review | Parallel.Versions
ReviewWindow
ReviewWindow
No time limit on review | NoLimitMove to next reviewer after | MoveOnKeep sending reminders after | Reminder
Allotted time:
Notification:
NofityAfter
NotifyAfter
Notify me after each reviewer | EachNotify me after final reviewer | Final
ReviewWindow
NoLimit
1S2S
ReviewTime
ReviewWindow
NoLimit
ReviewTime
ReviewTime
3S4S6S8S14S
ReviewWindow
NoLimit
ReviewTimeX
Please enter a number.{
ReviewTimeX
Please enter a whole number which is greater than zero.
3S4S6S8S16S21S25S26S28S33S
ReviewTime
day(s)
SaveChoices
SaveChoices
Save choices for next time. | 1
Categori_ze
_Edit Document
Send Docu_ment
_Forward
_Move to Folder...
_Remove from Folder$
O=Lotus Notes
O=Lotus Notes
PURSAFO
|.:#U
O=Lotus Notes
CN=Lotus Notes Template Development/O=Lotus Notes
PURSAFO
Fde!f^^
ReviewTime_1
$TITLE
$Info
$$ScriptName
$Body
$ACTIONS
'++LotusScript Development Environment:2:5:(Options):0:74
Option Public
'++LotusScript Development Environment:2:5:(Forward):0:1
Declare Sub InitializeDocument(source)
Declare Sub InitializeStatusList
Declare Sub RebuildList(InputList As Variant)
Declare Sub SetReviewerLists
Declare Sub SendNotification
Declare Sub InitiateReview(source)
Declare Sub GetReviewSequence
Declare Sub ResetAuthorNames
'++LotusScript Development Environment:2:5:(Declarations):0:10
'***** OBJECT VARIABLES *****
Dim s As NotesSession
Dim w As NotesUIWorkspace
Dim doc As NotesUIDocument
Dim db As NotesDatabase
Dim note As NotesDocument
Dim tempnote As NotesDocument
Dim maildoc As NotesDocument
Dim parent As NotesDocument
Dim child As NotesDocument
Dim children As NotesDocumentCollection
Dim item As NotesItem
Dim rtitem As NotesRichTextItem
Dim dt As NotesDateTime
'***** DATA VARIABLES - FIELDS DEFINED ON FORM*****
Dim ReviewStyle As Variant
Dim ReviewSeq As Variant
Dim Reviewers As Variant
Dim PreviousReviewers As Variant
Dim FutureReviewers As Variant
Dim CurrentReviewers As Variant
Dim DocumentAuthors As Variant
Dim Originator As Variant
Dim Versioning As Variant
'***** DATA VARIABLE - FIELDS DEFINED IN SCRIPT, NOT DEFINED ON FORM
Dim Status As Variant
Dim Locked As Variant
Dim InProcess As Variant
'***** SCRIPT PROCESSING VARIABLES *****
Dim ReviewerList() As Variant
Dim OldList() As Variant
Dim InputList As Variant
Dim NewList() As Variant
Dim ListMax As Integer
Dim tmpList As Variant
Dim CompareValue As Variant
Dim Elements As Integer
Dim DocWasSaved As Integer
Dim ParentIsLocked As Integer
Dim DocIsLocked As Integer
Dim LockedBy As Variant
Dim InitiatingReview As Integer
Dim CompareValueFound As Integer
Dim FinalSave As Variant
'***** TEMP PROCESSING FIELDS - ADDED TO DOC ON OPEN, DELETED ON CLOSE*****
Dim CurrentUser As String
Dim Action As Variant
Dim StatusList(1 To 4) As Variant
'++LotusScript Development Environment:2:2:InitializeDocument:1:8
Sub InitializeDocument(source)
'This routine initializes object variables, global variables and some field values
'Turn off Autoreload to speed up response time (this means we need to do manual reloads and refreshes)
source.AutoReload = False
Set w = New NotesUIWorkspace
Set s = New NotesSession
Set db = s.CurrentDatabase
Set note = source.Document
CurrentUser = s.CommonUserName
note.tmpCurrentUser = CurrentUser
Originator = note.From
InitializeStatusList
If source.IsNewDoc Then
note.Status = StatusList(1)
note.Scope = "Public"
Else
If note.Locked(0) <> "" Then
DocIsLocked = True
LockedBy = note.Locked
End If
End If
'Initialize V3 documents
If Not(note.HasItem("Status")) Then
note.Status = StatusList(1)
note.Scope = "Public"
note.DocumentAuthors = s.CommonUserName
note.From = Evaluate("@Name([CN]; From)", note)
End If
'Clear the status bar
Print
End Sub
'++LotusScript Development Environment:2:2:InitializeStatusList:1:8
Sub InitializeStatusList
'Statuses are referred to positionally. If you want the works to display differently in the view (like if you want the first
'status to be None instead of New) you would change them here.
StatusList(1) = "New"
StatusList(2) = "Ready for Review"
StatusList(3) = "In Review"
StatusList(4) = "Review Complete"
note.StatusList = StatusList
End Sub
'++LotusScript Development Environment:2:2:RebuildList:1:8
Sub RebuildList(InputList As Variant)
'This routine removes a value from a list (passed by reference)
ListMax = Ubound(InputList)
'Save original capitalization in OldList then lowercase both InputList and CompareValue
Redim OldList (ListMax)
For i = 0 To ListMax
OldList(i) = InputList(i)
InputList(i) = Lcase(InputList(i))
Next
CompareValue = Lcase(CompareValue)
Redim NewList (ListMax)
x = 0
For y = 0 To ListMax
If InputList(y) <> CompareValue Then
NewList(x) = OldList(y)
x = x + 1
End If
Next
If x > 0 Then
Redim Preserve NewList(x-1)
tmpList = NewList
Else
tmpList = "None"
End If
If x = ListMax Then
CompareValueFound = True
Else
CompareValueFound = False
End If
End Sub
'++LotusScript Development Environment:2:2:SetReviewerLists:1:8
Sub SetReviewerLists
Print "Updating Reviewer Lists"
For a Parallel submit, set CurrentReviewers to the Reviewers field (there are no
FutureReviewers - all reviewers are current) and set FutureReviewers to "None".
For a Parallel review, remove CurrentUser from CurrentReviewers and add it to
PreviousReviewers.
For a Serial submit, set CurrentReviewers to the first Reviewer and set FutureReviewers
to the Reviewers field minus the first Reviewer
For a Serial review remove CurrentUser from FutureReviewers and add it to
PreviousReviewers.
%ENDREM
ListMax = 0
Set dt = New NotesDateTime("")
dt.SetNow
If Action(0) = "Complete" Then ReviewerLogEntry = CurrentUser & " on " & Format(dt.LSLocalTime, "Short Date")
Select Case ReviewSeq
Case "Parallel"
'On submit Set future reviewers to None since all reviewers are current
If Action(0) = "Submit" Then
Reviewers = note.Reviewers
tmpList = Reviewers
note.FutureReviewers = "None"
Else
'(this is for action = Complete)
'For Response Reviews, we maintain the status in the parent
If note.IsResponse Then
CurrentReviewers = parent.CurrentReviewers
Set item = parent.GetFirstItem("ReviewerLog")
Else
CurrentReviewers = note.CurrentReviewers
Set item = note.GetFirstItem("ReviewerLog")
End If
item.AppendToTextList(ReviewerLogEntry)
CompareValue = CurrentUser
'Remove the CurrentUser from the CurrentReviewers list
Call RebuildList(CurrentReviewers)
End If
FieldName = "CurrentReviewers"
Case "Serial"
'On submit, put all reviewers in the future reviewers list
GoToField causes any active embedded objects to de-activate
0R1S
0R4S
0R7S12S>
Status
StatusListv
5S7S8S
Setup Review Cycle
GetReviewCycle
Status
StatusList
ReviewCycle
ReviewStyle
ReviewWindow
ReviewTime
NotifyAfter
SaveChoices
1S2S5S6S10S13S18S21S22S23S24S25S26S27S28S30S
ReviewCycle
GetReviewCycle
GetReviewCycle
0RR1S2S5S6S8S10S14S
ReviewStyle
ReviewCycle
Serial.NoVersions
ReviewCycle
0RR1S2S3S9S10S12S14S18S
ReviewWindow
ReviewCycle
NoLimit
ReviewCycle
0R1S2S3S9S10S12S14S20S23S
ReviewTime
ReviewCycle
ReviewCycle
0R1S2S3S9S10S12S14S20S23S
NotifyAfter
ReviewCycle
Final
ReviewCycle
0R1S2S3S9S10S12S14S20S23S
SaveChoices
ReviewCycle
ReviewCycle
0R1S2S3S9S10S12S14S18S
ReviewOptions
Review Cycle
0RR10S12S13S15S20S
Status
StatusList
0RR1S2S3S9S12S
ReviewCycle
SaveChoices
ReviewStyle
ReviewWindow
ReviewTime
NotifyAfter
SaveChoices
0R1S2S3S6S7S9S11S14S15S16S17S18S19S20S21S23S
ReviewTime
ReviewWindow
NoLimit
ReviewTimeX
0RR1S2S3S6S7S9S11S
tmpReviewUnits
ReviewWindow
NoLimit
day(s)
0R1S2S3S6S7S9S11S
these are posted commands so that they do not execute until after the section is fully expanded (because the field it is going to is inside the section)
0RR1S
Reviewers
0R4S
tmpCurrentUser
Status
StatusListv
1S2S6S8S9S13S15S16S
Clear Review Cycle
InReview
Status
StatusListv
1S2S8S10S11S13S15S
ReviewerList
InReview
CurrentReviewers
0R1S2S6S8S
Status
StatusList
0RR1S2S3S7S
ReviewSequence
All Reviewers simultaneously
0R1S2S3S
Versioning
Edit Original Document
0R1S2S3S
NotifyAfter
Notify Originator after each Reviewer
0R1S2S3S
Reviewers
0R1S2S3S
PreviousReviewers
0R1S2S3S
CurrentReviewers
0R1S2S3S
FutureReviewers
0R1S2S3S
$VersionOpt
0R1S2S3S
InReview
ReviewerList
Review of document:
Subject
I no longer require you to review this document. Thank you for your efforts.
3S4S6S11SCategoriesPress ENTER for list of keywords or to add a new keyword
($All)
4S6S
Status
StatusListv
4S6S7S8S9S
Reviewers:
Reviewers
Reviewers
Reviewers
Status
StatusListv
PreviousReviewers
4S6S7S8S9S10S11S12S13S
Previous reviewers:
PreviousReviewers
PreviousReviewers
Status
StatusListv
4S6S7S8S9S
Current reviewer:
CurrentReviewers
CurrentReviewers
Status
StatusListv
FutureReviewers
4S6S7S8S9S10S11S12S13S
Future reviewers:
FutureReviewers
FutureReviewers
Status
StatusListv
Status
StatusListv
4S6S7S8S9S13S15S16S17S18S
Review type:
ReviewStyle
ReviewStyle
Serial review | Serial.NoVersionsSerial (keep all revisions) | Serial.VersionsDocument reservations | Parallel.NoVersionsResponse review | Parallel.Versions
Deadline:
ReviewWindow
ReviewWindow
No time limit for each review | NoLimitMove to next reviewer after: | MoveOnKeep sending reminders after: | Reminder
ReviewTime
ReviewTime
ReviewWindow
NoLimit
day(s)
3S4S6S8S
tmpReviewUnits
Notification:
NotifyAfter
NotifyAfter
Notify originator after each reviewer | EachNotify originator after final reviewer | Final
Status
tmpStatusList
Status
tmpStatusList
4S6S7S8S9S13S15S16S17S18S
....................
ReviewerLog
1S2S3S4S
Reviewer Log
ReviewerLog
1S2S
ReviewerLog
ReviewerLog
BodyEnter the text (or a description) of the document.
Close
0S0E
_Edit Document
DocumentAuthors
9S15S
Categori_ze
_Forward
_Move to Folder...
_Remove from Folder
Send Docu_ment
O=Lotus Notes
O=Lotus Notes
PURSAFO
|.:#U
O=Lotus Notes
CN=Lotus Notes Template Development/O=Lotus Notes
PURSAFO
Fde!f^^
7m@^-
$TITLE
$AUTOLAUNCH
$Info
$SubForms
$WindowTitle
$Script
$$Script_O
$$ScriptName
$$FormScript
$$$FormScript_O
$$Reviewers
$Reviewers_O
_ViewIcon
TimeCreated
$Body
$ACTIONS
Process Late Reviews
Selects those documents which are in review and have due dates which have passed. Based upon the review style of the document, it then either moves it along to the next reviewer, marks it as complete, or simply notifies the current reviewer(s) that their review is overdue.1
Format(dtNow.LSLocalTime, "Short Date") & " at " & _
Format(dtNow.LSLocalTime, "Long Time") & _
". Expired documents are archived after " & ExpiredLife & _
" days. All other documents are archived after " & DocumentLife & " days of inactivity."
docLog.Save True,True
Call docLog.CopyToDatabase(dbArchive)
End If
Next
End Sub
O=Lotus Notes
O=Lotus Notes
PURSAFO
|.:#U
O=Lotus Notes
CN=Lotus Notes Template Development/O=Lotus Notes
PURSAFO
Fde!f^^
$TITLE
$AssistType
$AssistLastRun
$AssistDocCount
$AssistFlags
$AssistTrigger
$AssistInfo
$AssistQuery
$AssistAction
$AssistAction_Ex
Archive Profile
Times New Roman
'++LotusScript Development Environment:2:5:(Options):0:66
Option Public
'++LotusScript Development Environment:2:5:(Forward):0:1
Declare Sub Initialize
Declare Sub ProcessExistingArchiveDB
Declare Sub ProcessNonExistingArchiveDB
Declare Sub ProcessArchiveDbExists
Declare Sub CreateNewArchiveDB
'++LotusScript Development Environment:2:5:(Declarations):0:10
%INCLUDE "lsconst.lss"
Dim s As NotesSession
Dim w As NotesUIWorkspace
Dim db As NotesDatabase
Dim existingdb As NotesDatabase
Dim archivedb As NotesDatabase
Dim view As NotesView
Dim note As NotesDocument
Dim profile As NotesDocument
Dim archivedoc As NotesDocument
Dim doc As NotesUIDocument
Dim DocWasSaved As Integer
Dim DoNotClose As Variant
Dim ExistingServer As String
Dim ExistingPath As String
'++LotusScript Development Environment:2:2:Initialize:1:10
Sub Initialize
End Sub
'++LotusScript Development Environment:2:2:ProcessExistingArchiveDB:1:12
Sub ProcessExistingArchiveDB
an existing archive already exists and the user has choosen to create a new one
this function gets called on one of two occasions
either the document has a value in the tmpArchivePath field
or the user entered a server and path that has an existing database
we need to handle both cases
%END REM
End Sub
'++LotusScript Development Environment:2:2:ProcessNonExistingArchiveDB:1:8
Sub ProcessNonExistingArchiveDB
On Error Goto ProcessError
On Error 4005 Goto DbCreateError
'render the dialog box to get the location of the archive database
If (w.DialogBox("(ArchiveProfileDlg)",True,True,"Specify New Location")) Then
'see if the archive database exists
Set archivedb = New NotesDatabase(note.ArchiveServer(0),note.ArchivePath(0))
If (archivedb.IsOpen) Then
Msgbox "Database already exists. Enter a new location"
ProcessNonExistingArchiveDB
Else
Set archivedb = db.CreateCopy(note.ArchiveServer(0),note.ArchivePath(0))
archivedb.Title = db.Title & " (Archive)"
End If
Call doc.Reload
Call doc.Refresh
Else
note.ArchiveServer = ""
note.ArchivePath = ""
End If
Exit Sub
DbCreateError:
Select Case Msgbox("Error creating archive database. The server may be down or you don't have access to create new databases on the server. Click Yes to try a different location now or No to cancel.",36,"Error")
Case 6
ProcessNonExistingArchiveDb
End Select
Exit Sub
ProcessError:
Msgbox Error & " - (ProcessNonExistingArchiveDB)"
Exit Sub
End Sub
'++LotusScript Development Environment:2:2:ProcessArchiveDbExists:1:8
Sub ProcessArchiveDbExists
'this function gets called if a database already exists in the tmpArchiveServer field
'render the dialog box to get the location of the archive database
On Error 4005 Goto DbCreateError
If (w.DialogBox("(ProcessExistingDbDlg)",True,True,"Specify New Location")) Then
On Error Resume Next
'see if the archive database exists
Set archivedb = New NotesDatabase(note.ArchiveServer(0),note.ArchivePath(0))
If (archivedb.IsOpen) Then
Msgbox "Database already exists. Enter a new location"
ProcessArchiveDbExists
Else
Call CreateNewArchiveDB
archivedb.Title = db.Title & " (Archive)"
End If
Call doc.reload
Call doc.refresh
End If
Exit Sub
DbCreateError:
Select Case Msgbox("Error creating archive database. The server may be down or you don't have access to create new databases on the server. Click Yes to try a different location now or No to cancel.",36,"Error")
Case 6
ProcessNonExistingArchiveDb
End Select
Exit Sub
End Sub
'++LotusScript Development Environment:2:2:CreateNewArchiveDB:1:8
Sub CreateNewArchiveDB
On Error 4005 Goto DbCreateError
On Error Goto ProcessError
'first, create the archive database
Set archivedb = db.CreateCopy(note.ArchiveServer(0),note.ArchivePath(0))
'if the profile says to copy new documents, then copy them now
If (note.CopyOptions(0) = "1") Then
Set allDocs = existingdb.AllDocuments
For i = 1 To allDocs.Count
Set archivedoc = allDocs.GetNthDocument(i)
Call archivedoc.CopyToDatabase(archivedb)
Next
End If
'if the profile says we should delete the original archive database, then remove it
If (note.DeleteOptions(0) = "1") Then Call existingdb.Remove
Exit Sub
DbCreateError:
Select Case Msgbox("Error creating archive database. The server may be down or you don't have access to create new databases on the server. Click Yes to try a different location now or No to cancel.",36,"Error")
Case 6
ProcessNonExistingArchiveDb
End Select
Exit Sub
ProcessError:
Msgbox Error & " - (ProcessNonExistingArchiveDB)"
Exit Sub
End Sub
Archive Profile'++LotusScript Development Environment:2:5:(Options):0:66
'++LotusScript Development Environment:2:5:(Forward):0:1
Declare Sub Queryclose(Source As Notesuidocument, Continue As Variant)
Declare Sub Querysave(Source As Notesuidocument, Continue As Variant)
Declare Sub Postopen(Source As Notesuidocument)
'++LotusScript Development Environment:2:5:(Declarations):0:2
'++LotusScript Development Environment:2:2:BindEvents:1:129
Private Sub BindEvents(Byval Objectname_ As String)
Static Source As NOTESUIDOCUMENT
Set Source = Bind(Objectname_)
On Event Queryclose From Source Call Queryclose
On Event Querysave From Source Call Querysave
On Event Postopen From Source Call Postopen
End Sub
'++LotusScript Development Environment:2:2:Queryclose:1:12
Sub Queryclose(Source As Notesuidocument, Continue As Variant)
If (DocWasSaved = False) Or (profile Is Nothing) Or DoNotClose Then Exit Sub
ItemList = profile.Items
Forall n In ItemList
profile.RemoveItem(n.Name)
End Forall
note.CopyAllItems profile
profile.SaveOptions = "1"
profile.save True, True
End Sub
'++LotusScript Development Environment:2:2:Querysave:1:12
Sub Querysave(Source As Notesuidocument, Continue As Variant)
DocWasSaved = True
DoNotClose = False
If Not(profile Is Nothing) Then note.SaveOptions = "0"
If (note.ArchivePath(0) = "") Then Msgbox "You will need to specify a location of the archive database before you can archive documents.",16
source.Reload
source.RefreshHideFormulas
End Sub
'++LotusScript Development Environment:2:2:Postopen:1:12
Sub Postopen(Source As Notesuidocument)
'initialize global variables
Set note = source.Document
Set w = New NotesUIWorkspace
Set s = New NotesSession
Set db = s.CurrentDatabase
Set view = db.GetView("Archiving")
Set doc = source
'turn off auto reload to make processing faster
source.AutoReload = False
'if this is not a new doc, we don't need to continue
If Not (source.IsNewDoc) Then Exit Sub
'get the existing profile
key = "Archive Profile"
Set profile = view.GetDocumentByKey(key,False)
If profile Is Nothing Then
'an existing profile was not found
note.ProtectFromArchive = 1
note.ExcludeFromView = "D"
note.From = "Archiving"
note.Subject = "Archive Profile"
note.Categories = "(Archive)"
Call note.ReplaceItemValue("_ViewIcon", 11)
source.reload
Else
'copy the profile fields to this document
ItemList = note.Items
Forall n In ItemList
note.RemoveItem(n.Name)
End Forall
profile.CopyAllItems note
source.Reload
If source.EditMode Then source.Refresh
End If
DocWasSaved = False
End Sub
K ,`
Archive Profile
ArchiveExpired
Archive Expired documents | Yes
after
ExpiredLife
Number cannot be negative.{
3S4S6S11SExpiredLife
days
ArchiveInactive
Archive documents which have no activity | Yes
after
DocumentLife
Number cannot be negative.{
3S4S6S11SDocumentLife
days
ArchiveLog
Generate an Archive Log each time an archive occurs | Yes
IncludeDoclinks
Include document links | Yes
Archive Profile editors:
ProfileEditors
Archive Server:
ArchivePath
ArchiveServer
Local
ArchiveServer
3S4S9S10S12S14StmpArchiveServer
Archive Path:
ArchivePath
tmpArchivePath
Categori_zeK
_Edit Document
Send Docu_ment
_Forward
Close
0S0E
Save Profile
0S0E
Specify Archive Location'++LotusScript Development Environment:2:5:(Options):0:66
'++LotusScript Development Environment:2:5:(Forward):0:1
Declare Sub Click(Source As Button)
'++LotusScript Development Environment:2:5:(Declarations):0:2
'++LotusScript Development Environment:2:2:BindEvents:1:129
Private Sub BindEvents(Byval Objectname_ As String)
Static Source As BUTTON
Set Source = Bind(Objectname_)
On Event Click From Source Call Click
End Sub
'++LotusScript Development Environment:2:2:Click:1:12
Sub Click(Source As Button)
'see if an archive database already exists based upon some field values