|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done.
Native to Lotus Domino. The User Experience unseen for Lotus Domino.
Do more with less. Really.
See the possibilities Docova unleashes for Lotus Domino. |
-- 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 December 31 to save $350. |
|
|
|
|
|
|
|
|
|
|