Email:   
Home
In This Issue
EasyPrint
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 --

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 --

DEPARTMENT CALENDAR - MANAGE AND SHARE A COMMON CALENDAR WITH YOUR TEAMS
Are you responsible for improving your organization's Group Calendaring tool? Have you been tasked to find a true group calendar tool with Itinerary, Time-Off, Sign In/Out and Bulletins/Events module that seamlessly integrates with Domino calendaring?

If so, Logic Springs Technologies will make answering these questions a whole lot easier!

Learn how by visiting us at www.departmentcalendar.com

Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login