Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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))


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Lotus Technologies > Domino (77 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   Sloppy analysis at the core of another Domino vs. SharePoint report
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- 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.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login