Search DominoPower's 11,443 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.
Global Web profile documents (continued)

Putting it all together
Now let's update our popup calendar form to use the values from the profile fields. If you're not following from my last article and don't have this form, don't worry, just create the fields on a blank form as we go along.

Open the calpop form in Domino Designer and add a hidden computed text field called LangInfo. Select the option to allow this field to have multiple values. The formula for this field should be:

tLang:=@dblookup("";"";"cal_profile";"1";"SelLang");
@DbLookup("";"";"cal_profile";"1";tLang+"_digest")

The first line looks up the value of the SelLang field on the calendar profile form. This is the field that tells us which language is currently active. The second line uses this info to lookup the correct digest field, and retrieve all the day and month names. An example of the values in this field for an English version of the calendar would be:

SU; MO; TU; WE; TH; FR; SA; Jan; Feb; Mar; Apr; May; June; Jul; Aug; Sep; Oct; Nov; Dec

The blue Computed Value field in Figure C is where the calendar form looks up the month name based on the values in the LangInfo field, and the date in the DateVal field.

FIGURE C


The new fields lookup values from our profile documents. Roll over picture for a larger image.

Change the formula for this computed text to:

tDate:=DateVal;
langMonths:=@Subset(LangInfo;-12);
tMonth:=@Subset(@Subset(langMonths;@Month(tDate));-1);
tMonth +" "+ @Text(@Year(tDate))

LangMonths gets the last twelve values for the LangInfo field, which corresponds to the twelve months. The tMonth variable first gets the month number of tDate via the @Month(tDate) command. This value is used in a subset command to get all the months before it.

For example, if the date in tDate is Apr 21, 2004, then the month number is 04, and the inner @Subset command retrieves the months Jan through Apr. The outer @Subset command gets the last entry of this list (Apr) and puts it in tMonth. The last line displays the string in tMonth followed by the year of the date in tDate, printing a string "Apr 2004".

Next, we need to add computed text fields to lookup the value of the names of each day of the week. Create each of these fields from SU through , they all use essentially the same formula. Here is the formula from the SU (Sunday) field:

tNum:=1;
tDays:=@Subset(LangInfo;7);
@Subset(@Subset(tDays;tNum);-1)

The first line tells us which day of the week we want (1=Sunday, 7=Saturday). The second line gets the first seven entries of the LangInfo field, which correspond to the days of the week in our preferred language. The last line uses the same technique we saw in the computed text element by using nested @Subset commands to retrieve all the days up to the day we are interested in, and then retrieves the last value from this list. So the formula for the Wednesday field would be:


« 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
Syncing Notes with Android phones
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
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: Online safety for virtual learning
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Seek and find: Strategies to locate filed-away emails fast
-- Advertisement --

Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done. Native to Lotus Domino. The User Experience unseen for Lotus Domino. Do more with less. Really.

See the possibilities Docova unleashes for Lotus Domino.
-- Advertisement --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login