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)

Global profile documents
Global profile documents contain settings that are applied across an entire database or application. The trick to creating a global profile form is that you want to ensure there is only one document ever created with the form. In our example we will create a global profile document to store different language settings for the days of the week and month names.

If you are following along from my last article, open the database that contains the popup calendar form and create a new form named "CalPro" (calendar profile). Next, create a computed text field named "docid", the formula for this field should be: @Text(@DocumentUniqueID). We will use the unique id of the document to ensure we only allow one document with this form per database.

Beside docid, create a computed text field named "SaveOptions". SaveOptions is a reserved Domino field name that controls whether the field contents in an edited form will actually be saved when the save command is issued. If this field is set to "0" then no save occurs and no new document will be created. The formula for this field should be:

@If(@IsError(@DbLookup("";"";"cal_profile";"1";"docid")); "1"; @If(@DbLookup("";"";"cal_profile";"1";"docid") = docid; "1";"0"))

This formula consists of one @If statement nested inside another. The first @If statement checks to see if it can do a lookup in the cal_profile view (which we will create in a minute) for the first document and tries to retrieve its unique document id. If this lookup is an error, then no documents exist with this form so the SaveOptions field gets set to "1" which means changes will be saved.

On the other hand, if the lookup is a success, that means a document already exists with this form. The second @If statement retrieves that document's unique id, and compares it to this document's unique id. If they match then we are editing the right document and the SaveOptions field becomes "1". If they don't match, the user is trying to create a second calendar profile document, so we set SaveOptions to "0" to prevent the user from saving.

Next, create a radio button field named "SelLang". This will control which of the languages will be the current active language. The choices for this field should be "Lang1", "Lang2", etc., depending on how many languages you want to provide. My next article will make this field obsolete, as we will create individual profile documents for each user, allowing each user to select their own preferred language.

We now need a series of fields to hold information on the names of the days and months in different languages. First, create an editable text field named "Lang1_Name", and then a table to hold fields for the days of the week (Lang1_SU for Sunday, etc.) and for the month names (Lang1_Jan for January, etc.) as depicted in Figure A.


« 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 --

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

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login