|
|
|
|
|
|
|
|
|
|
|
|
|
|
Those pesky keyword lists (continued)
Set the keyword formula to pull in the list from the correct document in the view. When using a lookup of this type, especially with a configuration document that could be deleted by accident, it's important to include clear error messages, and it can be helpful to have meaningful names for the lookup, as in Figure D. It's also a good idea to provide some access control to keep the wrong folks from changing the lists or deleting them. I usually provide a view restricted to a specific role and a hidden view for the lookups.
FIGURE D
 
Here is the formula for a keyword field using a configuration document. Roll over picture for a larger image.
The code for the field, using my view, looks like this:
view:= "Lookup Categories";
col:=2;
keyword:= "Keywordlist CategoryReply";
list := @DbLookup("";"";view;keyword;col);
@If(@IsError(list);"Error occurred in value lookup: Please contact the database administrator": ("Field CategoryReply could not locate required config doc: " + @Text(list)); list:"(none)")
|
Note that I'm testing for errors and have entered a fairly clear message to be returned in case of error, both to the user and the administrator.
Last of all, you should create the configuration record. In this case, I've created a record with a List Title of Keywordlist CategoryReply that includes a description as to where the field can be found and what it's used for, the list of initial values, and perhaps even some examples.
Now my users can change the values that will be available in that field to their heart's content without me (the developer) having to get involved, especially if I provide directions for them in the Using This Database document.
While this is a wonderful tool, there are places where it's not a good idea, such as fields whose values are keys for formulas, whether Hide-when, field, or agent formulas. If you want to have this kind of flexibility in those situations, you can get it through the use of value aliases, but you need tight control and a well-trained administrator to ensure that everything continues to function properly.
If you're feeling really ambitious, you can provide an agent to check for the presence of all the required configuration documents and perform an appropriate action if they aren't found (create them, send an email, etc.)
Bulk reprints Bulk reprints of this article (in quantities of 100 or more) are available for a fee from Reprint Services, a ZATZ business partner. Contact them at reprints@zatz.com or by calling 1-800-217-7874.
|
Brent Hawthorne is Assistant Vice President for Network Computing and Groupware at Western Interstate Bancorp. He prefers the great outdoors to work, but finds it doesn't pay nearly as well. He can be reached at brent_hawthorne@firstplus.com.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.
The many included activities and demos will make you a pro! Expert instructor help is a click away.
Click here to try a FREE demo course!! |
-- 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. |
|
|
|
|
|
|
|
|
|
|