Email:   
Home
In This Issue
Email a Friend
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.
PROGRAMMING POWER
Extending the automated signature generator
By Mick Moignard

This is the last part of our "Building an automated signature generator application" series. If you haven't read the previous three parts, you'll find links to them at the end of this article. In this week's installment, we'll learn how to extend the program with new fields.

What else can it do?
What else can we talk about? How about extending it to use new fields? This is pretty easy -- there are a number of simple steps.

First, add the field to the main form. I'd suggest using the same name all the way through the code; makes it easier. Of course, you will find that I haven't always done that, but such is life. Check the SignatureData form, and see, for example, where I added the field Strapline.

Next, add the new fields to the placeholder insertion code. This has to be done twice, once in each template form. In each form is the Action "Insert Placeholder". This contains the code we saw a bit back:

promptlist:= "HTTP Link 1":"Logo Image 1":"Logo Alt 1":"HTTP Link 2":"Logo Image 2":
"Logo Alt 2":"User Name":"Email":"Job Title":"Phone":"Fax":"Site Address":"Map Street":
"Map Country":"Map City":"Map PostCode":"Department":"Room":"Company":"Cell Phone":
"MAP URL":"Strapline";
fieldlist:= "http":"http_image":"http_image_alt":"http_1":"http_image_1":
"http_image_alt_1":"username":"email":"title":"Phone":"fax":"Address":"Street":
"country":"city":"zip":"dept":"room":"company":"cellPhone":"MapURL":"strapline";
fieldname := @Prompt([OkCancelList]; "Select Field"; "Select the fieldname to insert as a placeholder"; "";promptlist);
@Command([TextSetFontColor];[Red]);
@Command([TextBold]);
@Command([EditInsertText];"#%"+@ReplaceSubstring(fieldname;promptlist;fieldlist)+"%#");
@Command([TextSetFontColor];[Black]);
@Command([TextBold])

All you have to do here is to add a title for the new field to the value list for promptlist, and add the actual placeholder name -- use the field name -- in fieldlist's value set, at the same place in the list. Make sure that those two lists are balanced. Have the same number of elements and in the same order.





[ Next ]

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

2-Minute Tutorials
How do I...

  • integrate MS Office or OpenOffice with Notes?
  • create cross-tab reports and charts?
  • print serial letters and mailing labels?
  • create PDFs in Lotus Notes?


Check out the 2-minute tutorials here.
-- Advertisement --

Six Great Tools for IBM Lotus Sametime
  • Encrypted and secure, browser-based, persistent chat rooms
  • Complete chat logging and auditing
  • Easy-to-define IM help desk queues
  • Manage buddy lists across any organization
  • Integrate awareness into Microsoft Outlook
  • High powered, rapid bot development tools


Visit Instant Tech for free trials and more information.
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login