hcl notes resource reservations database: add weekday and description to notes view

HCL Notes and Domino: Tips & Tricks

HCL Notes Resource Reservations database: Add weekday and description to Notes view
January 14, 2009

By Lance Zakin, HCL CASA, CAAD
Notes and Domino
HCL BP NotesMail
The Notes Resource Reservations database is an application designed to allow users workgroups to schedule and reserve conference rooms and physical resources such as office and audiovisual equipment. However, the Notes views in this database do not display the description and weekday such as Monday, Tuesday, Wednesday, etc. You can create a new shared view using the instructions below.

Use Domino Designer to add the weekday and description to a Notes view

1. Start Domino Designer and copy/paste the default view design element "Reservations By Date". After pasting click "No" when prompted to be automatically updated as seen below. NOTE: You should copy/paste using a Notes ID in which the end user's Notes client ECL has the proper access, otherwise, the end user might be prompted to trust the signer of the Notes view.

2. Rename the Notes view you pasted "Copy Of Reservations By Date" to "MyCompany Reservations\By Date and Weekday". Open the Notes view design element "MyCompany Reservations\By Date and Weekday" and replace the first Notes view column formula with the code below.

REM "Coded by Lance Zakin - www.notesmail.com";
Year := @Text(@Year(StartDateTime));
Mos := @Text(@Month(StartDateTime));
Day := @Text(@Day(StartDateTime));
MosFix := @Replace(Mos; "1"; "01");
@Set("MosFix"; @Replace(MosFix; "2"; "02"));
@Set("MosFix"; @Replace(MosFix; "3"; "03"));
@Set("MosFix"; @Replace(MosFix; "4"; "04"));
@Set("MosFix"; @Replace(MosFix; "5"; "05"));
@Set("MosFix"; @Replace(MosFix; "6"; "06"));
@Set("MosFix"; @Replace(MosFix; "7"; "07"));
@Set("MosFix"; @Replace(MosFix; "8"; "08"));
@Set("MosFix"; @Replace(MosFix; "9"; "09"));
DayFix := @Replace(Day; "1"; "01");
@Set("DayFix"; @Replace(DayFix; "2"; "02"));
@Set("DayFix"; @Replace(DayFix; "3"; "03"));
@Set("DayFix"; @Replace(DayFix; "4"; "04"));
@Set("DayFix"; @Replace(DayFix; "5"; "05"));
@Set("DayFix"; @Replace(DayFix; "6"; "06"));
@Set("DayFix"; @Replace(DayFix; "7"; "07"));
@Set("DayFix"; @Replace(DayFix; "8"; "08"));
@Set("DayFix"; @Replace(DayFix; "9"; "09"));
Weekday := @Weekday(StartDateTime);
WeekdayName := @Replace(@Text(Weekday); "1"; "Sunday");
@Set("WeekdayName"; @Replace(WeekdayName;"2"; "Monday"));
@Set("WeekdayName"; @Replace(WeekdayName; "3"; "Tuesday"));
@Set("WeekdayName"; @Replace(WeekdayName; "4"; "Wednesday"));
@Set("WeekdayName"; @Replace(WeekdayName; "5"; "Thursday"));
@Set("WeekdayName"; @Replace(WeekdayName; "6"; "Friday"));
@Set("WeekdayName"; @Replace(WeekdayName; "7"; "Saturday"));
Year + "-" + MosFix + "-" + DayFix + " " + WeekdayName

3. Create a new Notes view column by clicking Create - Append New Column. Double click the new column and type title "Description". Close the Column property box, then click Field radio button and choose field "Purpose". Click File - Save, then close Domino Designer and test the new Notes view you created.