|
|
|
|
|
|
|
|
|
|
|
|
|
|
Build a Domino pop-up calendar widget using formula language (continued)
Both the upField and DateVal fields should be hidden from the browser. Remember how we discussed that every calendar is just a grid with seven columns? Well the easiest way to create a grid on the Web is with an HTML table. Add the following code (without the line numbers, of course) directly to your form and designate it as pass-through HTML:
1 <table>
2 <tr><td> COMPUTED-TEXT [Back 1 year] </td><td> COMPUTED-TEXT [Back 1 month]</td><td colspan=3>COMPUTED-TEXT [Current month and year]</td><td> COMPUTED-TEXT [Forward 1 month] </td><td> COMPUTED-TEXT [Forward 1 year] </td></tr>
3 <tr><td>SU</td><td>MO</td><td>TU</td><td>WE</td><td>TH</td><td>FR</td><td>SA</td> </tr><tr>
4 Computed RichTextField: calendar
5 </tr></table>
|
Line 1 opens the HTML table. There are five computed text fields on line 2. Four of them are almost identical and create links that allow users to navigate back one year ( << ), back one month ( < ), forward one month ( > ) and forward one year ( >> ). The formula to create the link that moves the calendar back one year in time is as follows:
newDate:= @Text(@Adjust(DateVal;-1;0;0;0;0;0));
{<a href="/} +@WebDbName+ {/calpop?OpenForm&fName=} +upField+ {&sDate=} +newDate+ {"> << </a>}
|
The first line adjusts the date contained in the DateVal field back by one year (-1) and places this value in the newDate variable. Line 2 then uses the newDate variable to create an HTML link back to this form but this time passing the new date in sDate URL parameter which will be read back into the DateVal field when the form is loaded in the same way we handle the passing the field name via the fName parameter. I have used the << symbol as a link to express a large jump back.
All but the middle computed text fields on the calpop form use essentially the same formula. The only difference is whether the year or month is adjusted, whether the new value is higher or lower and what symbol is used as a link. The back one month button would only have a different newDate variable like so:
newDate:= @Text(@Adjust(DateVal;0;-1;0;0;0;0));
|
The << symbol is replaced with a <. Similarly, the forward one month button uses the > symbol and has the following newDate variable:
newDate:= @Text(@Adjust(DateVal;0;1;0;0;0;0));
|
The forward one year computed text element has the following newDate assignment:
newDate:= @Text(@Adjust(DateVal;1;0;0;0;0;0));
|
The middle computed text field is not like the others in that it just displays the current month and year being viewed. Its formula is as follows:
tDate:=DateVal;
tMonth:=@Select(@Month(tDate); "Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec");
tMonth +" "+ @Text(@Year(tDate))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.
Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.
Learn how to easily clean up your address book. |
-- 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. |
|
|
|
|
|
|
|
|
|
|