Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
HANDS-ON NOTES DEVELOPMENT
Using one template for three different uses
By Chris Brown a.k.a. GreenJellybean

Have you ever wanted to create one template that can support multiple renditions of itself? An example could be a customized Discussion Forum Template that can be used by more than one group. This article explains how to do just that.

Let's say that you're tasked to create a customized Discussion Template for the Quality Assurance Group, with some extra features and a common look and feel. Within the Quality Assurance Group, there are three subgroups: Software, Hardware, and Data Quality Assurance. Each subgroup wants a few fields customized for their particular group, but the overall design of each discussion database should be the same. Your first instinct may be to create a template for each group, so that they each get their customized fields -- but that means maintaining three templates that are basically the same. If you make a design change to one, then all three need to be updated! The design of these templates can quickly get out of sync. A better solution, given this scenario, would be to have one common template for this group.

Naming convention
The first step in this direction is to consider your audience and naming conventions. You know that you'll have to support three separate groups within QA, so you'll need to set up a naming convention so that the application will know which group this database is built for. Let's use "QA" for Quality Assurance and "Disc" for Discussion.

That should cover the topmost level. For each of the subgroups within QA, let's just use the first letter of the group: "S" for Software QA, "H" for Hardware QA, and "D" for Data QA. Given that, when you create new databases off of your customized discussion template, you'll need to follow this naming convention (you'll see why when we look at the code in the next section).

Table A shows how your databases should be named:

Group Database name
Software QA QADiscS.nsf
Hardware QA QADiscH.nsf
Data QA QADiscD.nsf

Let's look at the code
Now let's look at how to set up customized fields based upon the group name. Let's say that each group has its own main contact phone number that needs to be displayed by default on the forms. In the Contact_Phone_Number field, you'll have the following code:





[ Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

PistolSTAR: the de facto standard for Lotus authentication
PistolStar's Password Power integrates with Microsoft Active Directory to enable single sign-on to Lotus applications and automatic recovery of the Notes ID password via self-service reset of the Active Directory password.

  • A single set of credentials to remember - one set of password policies to manage.
  • Cost-effective plug-ins integrate smoothly with your environment.
  • Proven, ground-breaking technology deployed to millions of users.


Learn more.
-- Advertisement --

Get in the Spotlight! Teamstudio Spotlight Awards 2009
For the second year, Teamstudio is holding the Teamstudio Spotlight Awards Contest to recognize developers of the Notes community for their most remarkable Notes applications! Winners will be announced at Lotusphere 2009 January and featured in DominoPower in the month of February. Prizes to include:

1st Prize: Your choice of one configured software product with installation at one site, Teamstudio's complete suite of tools for one user and an iPod Touch.
2nd Prize: Teamstudio's complete suite of tools.
3rd Prize: One tool of your choice.

For more information on how to enter, click here!

Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login