Delete any reservation that was created 2 days prior to today.
Reservation
0RL1S2S3S
PurgeDate
0R1S2S6S8S10S13S15S17S
ConvertResDate
ReserveDate
0R1S2S
Reservation
ConvertResDate
PurgeDate
false
0R3S4S5S6S7S8S10S15S
Lotus Notes
PURSAF
Debbie2 Branco
F)`b"
0|wm-
PURSAF
TS3+v
Q!NAuS"
$TITLE
$AssistType
$AssistLastRun
$AssistDocCount
$Comment
$AssistFlags
$AssistInfo
$AssistQuery
$AssistAction
$AssistAction_Ex
$UpdatedBy
$Flags
Times New Roman
Using Reservation Scheduler
To describe a Room:
To manage rooms, switch to the Resources view. There you will see room names and descriptions listed alphabetically. To create or delete a room, use the action buttons: Create Room and Delete Room.
In order to create a resource, you must be assigned the [Create Resource] role in the Access Control List.
Do not use commas in Resource names (in the Resource form). The Room Availability button in the Reservation form will interpret a comma as the end of a name. For example, Notes will interpret
Conference Room 12, Bld. #3
as two separate resources:
Conference Room 12
and
Bld. #3
To reserve a room:
To reserve a room, switch to one of the reservation views. Use the Create Reservation button to bring up a new reservation form. Follow the instructions on that form to create a new reservation.
To clean up old reservations:
Enable the Purge Reservations agent found in the Agent window by clicking View-->Agents, selecting the Purge agent, and then clicking Actions-->Enable Agent. This agent will delete reservations with a reservation date that is more than two days old.
ReserverEnter in the name of the person who is making the reservation.
AvailableResources
AvailableResourcesSaveCheck
NO_ACTION
ActionType
SaveOptions
Reserved By:
Phone #/Ext:
Reservation Date:
Start Time:
End Time:
Reservation
Reservation
Purpose (optional):
You have reserved:
1S2S
AvailableResources
0R3S4S
DisplayText
AvailableResources
AvailableResources
0S0E
ReservedByEnter the name of the person who is making the reservation.
ResPhoneNumber|
0S0E
ResPhoneNumber
PhoneNumber
1S2S3S
Phonenumber
PhoneNumberEnter the reserver's phone number or extension.
Today
ReserveDateEnter the date for this reservation.
StartTimeSelect a time slot for your requested Start Time.
StartTimeSlots2
EndTimeSelect a time slot for your requested End Time.
EndTimeSlots2
dM'++LotusScript Development Environment:2:5:(Options):0:66
'++LotusScript Development Environment:2:5:(Forward):0:1
Declare Sub Click(Source As Button)
Declare Function Interpret_Reservation_Date (dtReserveDate As NotesDateTime, sTempResDate As String, DayOfWeek As String) As Integer
Declare Sub NarrowDownValidResources (lResources List As Integer, dtStartTime As NotesDateTime, dtEndTime As NotesDateTime, ReserveColl As NotesDocumentCollection, dtReserve As NotesDateTime)
Declare Sub FindValidResources (lResources List As Integer, dtStartTime As NotesDateTime, dtEndTime As NotesDateTime, DayOfWeek As String, ResourceColl As NotesDocumentCollection)
'++LotusScript Development Environment:2:5:(Declarations):0:10
Const ERR_NoResources = "You must create the Resource(s) before creating a reservation."
Const ERR_InvalidDateFormat = "The Reservation Date format is missing or is not formatted correctly. Please enter a date using a valid date format (mm/dd/yy, mm-dd-yy, Tomorrow, Next Monday, etc.) and then click this button."
Const ERR_NameBlankError = "The Reserved By field is blank. Please enter the name of the person making the reservation."
Const ERR_PastReserveDate = "The Reservation Date has passed. Please enter a new date and then click this button."
Const ERR_BlankStartTime = "The Start Time is blank. Please select a starting time and then press this button."
Const ERR_BlankEndTime = "The End Time is blank. Please select an ending time and then press this button."
Const ERR_StartAndEndSame = "Your Start Time is equal to your End Time. Please change either the Start or End Time."
Const ERR_StartAfterEnd = "Your Start Time is later than your End Time. Please change either the Start or End Time."
Const ERR_NoResourcesForTime = "No Available Resources for this time. Please try another search criteria."
'++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)
Dim W As New NotesUIWorkspace
Dim CurDoc As NotesUIDocument
Dim S As New NotesSession
Dim Db As NotesDatabase
Dim ResourceColl As NotesDocumentCollection, ReservationsColl As NotesDocumentCollection
Dim ResourceSString As String, ReservationsSString As String, sTempResDate As String
Dim dtStartTime As New NotesDateTime("Today")
Dim dtEndTime As New NotesDateTime(Today)
Dim dtReserveDate As New NotesDateTime("Today")
Dim dtToday As New NotesDateTime("Today")
Dim DayOfWeek As String
Dim lResources List As Integer
Dim aDocAvail() As NotesDocument
Dim DocAvail As NotesDocument
Dim ilCount As Integer
Dim DocBE As NotesDocument
'Establish the handle to the current document, and set the default values for the start and end times
Set CurDoc = W.CurrentDocument
Set DocBE = CurDoc.Document
'Make sure the user has specified a name for who is
'reserving the room, for the Start Time, and for the
'End Time
If (CurDoc.FieldGetText ("ReservedBy") = "") Then
Messagebox Cstr(ERR_NameBlankError)
S.Close
Exit Sub
Elseif (CurDoc.FieldGetText("StartTime") = "") Then
'Determine what day of the week we're trying to reserve for
Select Case Weekday(dtReserveDate.LocalTime)
Case 1
DayOfWeek= "Sunday"
Case 2
DayOfWeek= "Monday"
Case 3
DayOfWeek= "Tuesday"
Case 4
DayOfWeek= "Wednesday"
Case 5
DayOfWeek= "Thursday"
Case 6
DayOfWeek = "Friday"
Case 7
DayOfWeek= "Saturday"
End Select
End Function
'++LotusScript Development Environment:2:2:NarrowDownValidResources:1:8
Sub NarrowDownValidResources (lResources List As Integer, dtStartTime As NotesDateTime, dtEndTime As NotesDateTime, ReserveColl As NotesDocumentCollection, dtReserve As NotesDateTime)
Dim iVal As Integer
Dim ReserveDoc As NotesDocument
Dim newDocStart As New NotesDateTime("Today")
Dim newDocEnd As New NotesDateTime("Today")
Dim sResName As String
newDocStart.SetNow
newDocEnd.SetNow
For iVal = 1 To ReserveColl.Count
Set ReserveDoc = ReserveColl.GetNthDocument(iVal)
sStartTime = ReserveDoc.StartTime(0)
sEndTime = ReserveDoc.EndTime(0)
sReserveDate = ReserveDoc.ReserveDate(0)
newDocStart.LocalTime=sStartTime
newDocEnd.LocalTime=sEndTime
'If the reservation isn't even for the date we're concerned about, there's nothing else to do
If Not (Format$(Datevalue(sReserveDate), "mm/dd/yy") = dtReserve.LocalTime) Then
Else
If ( (newDocStart.TimeDifference(dtStartTime) >= 0) And (newDocStart.TimeDifference(dtEndTime) < 0) ) Then
sResName = Cstr(ReserveDoc.ResourceName(0))
If (Iselement(lResources(sResName))) Then
Erase lResources(sResName)
End If
Elseif ( (newDocEnd.TimeDifference(dtStartTime) > 0) And (newDocEnd.TimeDifference(dtEndTime) <=0) ) Then
sResName = Cstr(ReserveDoc.ResourceName(0))
If (Iselement(lResources(sResName))) Then
Erase lResources(sResName)
End If
Elseif ( (newDocStart.TimeDifference(dtStartTime) <= 0) And (newDocEnd.TimeDifference(dtEndTime) >=0) ) Then
sResName = Cstr(ReserveDoc.ResourceName(0))
If (Iselement(lResources(sResName))) Then
Erase lResources(sResName)
End If
End If
End If
Next
End Sub
'++LotusScript Development Environment:2:2:FindValidResources:1:8
Sub FindValidResources (lResources List As Integer, dtStartTime As NotesDateTime, dtEndTime As NotesDateTime, DayOfWeek As String, ResourceColl As NotesDocumentCollection)
Dim iCountRes As Integer
Dim iCountDays As Integer
Dim iCountSlots As Integer
Dim iAdjustBy As Integer
Dim DontSave As Integer
Dim sStartTime As String, sEndTime As String, sCurTime As String
Dim ResourceDoc As NotesDocument
Dim lDifference As Long
Dim NeededStartTimes() As String
Dim ActualStartTimes() As String
Dim iFound As Integer
'Let's figure out the difference between the stop time and end time so we can build a dynamic array of start times
'which must exist in all reservation rooms in order for the room to fit our needs
The Purpose field is limited to 100 characters. It is currently
Purpose
characters in length."
0R1S2S3S4S11S12S
Purpose
Error
LengthError
0R6S7S9R15S17S21R28R
Discard Reservation
ActionType
DISCARD
1S3S
0S0E
SaveOPtions
0R1S3S
0S0E
Close
0S0E
Delete Reservation<
0S0E
InstructionsJ
(ReservationInstructions)
2S4S
_Move to Folder...
_Remove from FolderF
New Resource
ResourceName
3S4S5S6S
"Small Fonts
Times New Roman
"MS Sans Serif
Resource'
Hidden Fields:
CapacityKey
WeekDays
TimeSlots
Resource
Resource
Name:
Capacity:
Available days:
Available times:
Description:
New Resource
ResourceName
3S4S5S6S
BlankError
Please enter a resource name.
1S2S
LengthError
Please limit your resource name to 30 characters. It is currently
ResourceName
characters in length."
0R1S3S4S11S12S
ResourceName
BlankError{
ResourceName
LengthError
0R3S4S11R15S16S23R
ResourceNameEnter name of resource
CapacityX
-unknown-
CapacityX
0S0E
capacityEnter capacity of resource
WeekDays
DaysAvailable
WeekDays
TimeSlots
TimeSlotsAvailable
TimeSlots
ResourceDesc
Resource
Name:
Capacity:
Available days:
Available times:
Description:
ResourceName
DispResourceNameEnter name of resource
Capacity
DispCapacityEnter capacity of resource
DaysAvailable
DispDaysAvailable
TimeSlotsAvailable
DispTimeSlotsAvailable
ResourceDesc
DispResourceDesc
Resource
(DisplayTimeSlots)
More Information
0S0E
More...
Hidden Fields:
Document Author:
0S0E
DocumentAuthor
Composed:
DateComposed
Last Editor:
LastEditor
3S4S5S6S7S8S12S14S15S19S
LastEditor
Last Modified:
LastEditDate
3S4S5S6S7S8S9S10SLastEditDate
Categori_ze
_Edit Document
Send Docu_ment
_Forward
Doned
ActionType
1S3S
0S0E
SaveOPtions
0R1S3S
0S0E
LengthError
Please limit your resource name to 30 characters. It is currently
ResourceName
characters in length."
0R1S3S4S11S12S
NameBlankError
Please enter a resource name.
0R1S2S
ResourceName
Error
NameBlankError
ResourceName
Error
LengthError
0R3S4S6S2E12S14S18R22S23S25S2E31S33S37R44R
_Move to Folder...
_Remove from Folder
Times New Roman
Task List
&Switch To
About Reservation Scheduler
What does this database do?
Reservation Scheduler is an application designed to allow workgroups to schedule and reserve physical resources such as conference rooms or office equipment.
Where to find more information?
More information can be found in the v4 help database, HELP.NSF.
For Designers:
To customize this template to reserve resources other than rooms, do the following:
For example, to create a laptop computer reservation scheduler:
In the Resource Form:
Substitute
for the Room graphic at the top of the form
In the Main Navigator:
Substitute:
for the Room hotspot graphic
2. Change the Static Text from "Rooms" to "Laptops"
Access Control:
The default access of a database created with this template is "Author". There is a role called [Create Resource] in the access control list, which is associated with the "Resource" form. Database managers should assign this role to anyone who is authorized to create resources in the database.