Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
@FUNCTION TUTORIAL
Extracting values from multi-valued fields
By David Gewirtz

This month, Managing Editor Denise Amrich, fresh back from Lotusphere (I'm still not really bitter), is writing an editorial on her experiences down there in warm Florida (it's supposed to snow and sleet here tomorrow). Given that, rather than writing my normal "From the Editor-in-Chief" editorial (and subjecting you to two editorials in one issue), I'm rolling up my sleeves and diving into a Notes programming tutorial.

Scripting in Notes and Domino is relatively straightforward. That having been said, there are always interesting little challenges in any programming environment. In this short article, we're going to look at how the @Trim and @Replace functions can help clear unwanted elements from a list.

What's in a list?
Let's assume we have a list of names, like this:

Administrator/DP;Webmaster/DP;John Harris/DP;Bob Jackson/DP;Administrator/CLIENT

We're obviously making up the qualified names DP and CLIENT. But let's assume you're working for DP (DominoPower, in this case), and our list also contains the administration contact at a client (named, creatively, CLIENT) in our example.

Now, perhaps this is a list of notification candidates (for example, these are people to whom a message is sent when an event of some sort happens).

In this example, our list lives in the multi-valued field "Escalation". Most of the time, in our application, the entire escalation sequence is used. In our imaginary application, we're tracking certain information arriving in a database. And most of the time, we want to be able to notify everyone on the escalation list.

But, for certain information, we only want to notify certain key management individuals (in our example, those who are not the administrators or webmasters).

Extracting the unknown
If we always knew that we were going to be sending mail to John Harris and Bob Jackson, there'd be no challenge to this problem. But we want our program to be somewhat general purpose in nature. Let's say our imaginary company gets reorganized pretty readily. While we always want the CTO (this week, it's John Harris) and the program manager (for the next few weeks, that's still Bob Jackson) to be notified in case an important event happens, by the end of the month, there could be a new CTO who will need to be notified instead. We don't want to have to rewrite the program in order to extract those two names from the Escalation field.





[ Next ]

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

AUTOMATE LOTUS NOTES USER ID MANAGEMENT
ID Manager 4.5 from HELP Software provides a new level of automaton for managing Lotus Notes IDs. ID Manager lets Lotus Notes administrators get out of the business of creating and managing user IDs. Use our ROI calculator to see how quickly ID Manager will pay for itself.

Learn more about HELP Software products
-- Advertisement --

The Ultimate Notes Domino Training Experience - Amsterdam, 11-13 November
Get in-depth technical training that you can put to use on the job right away at THE VIEW's Admin2008 and Lotus Developer2008 Europe! One registration gets you into your choice of over 70 new and updated expert know-how sessions, one-on-one consultations, hands-on labs, and more.

See complete agendas and register by 10 October to save 495 euros!
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login