|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add random quotes and signatures to your Notes mail messages (continued)
The first line does a @DbColumn to return the list of all quote numbers currently in the quote database. The second line of the formula just initializes a numeric variable with a value of 1 for use with the @Random function later on. Because the column of numbers that we returned in the first line is in sorted order, we can use the last value in the last as the highest possible quotation number, hence the third line of the code.
The fourth line of the formula is the one that generates a pseudo-random number to select quote with. I say "pseudo-random" because I've noticed that the @Random function in Lotus Notes can occasionally return the same rounded number two times in a row. It's definitely good enough for our purposes here, though. The fifth line of the formula does a lookup into the "Docs" view of the database using the random number generated in line four.
Once we've gotten a text value to use for our quote, the sixth and final line of the formula concatenates (i.e., combines together) my phone number and email information along with the quote into a long string to be used in the Body field.
Once you've gotten this field value set to the formula shown above, save the form. You'll also need to mark the Memo form as not being updated from design refresh or replaces. Do that by switching to the Forms list in design mode, highlighting the Memo form, and pressing Alt-Enter to display the properties of this Design Document.
Finally, as you can see in Figure C, you should make sure that the box labeled "Do not allow design refresh/replace to modify" is checked. This prevents the nightly designed task from overwriting our modifications with the original design from the mail template on your mail server.
FIGURE C
 
If you don't do this, you'll lose your changes when the designer task runs at night. Roll over picture for a larger image.
That's it -- pretty quick to implement the design changes. What takes the real time, of course, is collecting and copying the quotes that you want into the Quote-ster database. That's kind of the fun, though. If you'd like a copy of the database used when writing this article, just send an email message to recheandia@dominopower.com. I'll mail you a database with over 250 quotes pre-populated. Let me know how it works out for you.
Richard Echeandia has been working with Lotus Notes for over 5 years and is a management consultant with Tactica Technology Group, a Lotus premium business partner headquartered in Dallas, Texas. He is a frequent speaker at Lotus conferences and was asked by Lotus to speak on Best Practices in Notes application development at this year's Lotusphere in Orlando. He can be reached on-line at recheandia@dominopower.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 --
Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.
Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).
Tap here to get started! |
|
|
|
|
|
|
|
|
|
|