|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
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:
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:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 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! |
|
|
|
|
|
|
|
|
|
|