|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 --
PDF Conversion for Lotus Notes
Convert Lotus Notes documents to PDF for sharing, archiving or web printing.
- 1-step PDF: As easy as clicking a Lotus Notes toolbar icon
- Archive email folders or views as a self-contained PDF
- Convert any document collection into a PDF file
- Produce print-quality output from Web applications
- Client side or Server side conversion
- Doesn't require any DLL files
- LotusScript API for developers
Ready to learn more? |
-- Advertisement --
Easy Domino Access: Remove Passwords, End Login Prompts, Reduce Password Management
PistolStar's Password Power provides browser-based single sign-on to Lotus Domino, Sametime and Quickr with the enhanced security of the Kerberos or NTLM authentication protocol.
- Full support available for NTLM authentication protocol in non-Active Directory environments
- Seamlessly integrate Microsoft Active Directory and the Kerberos authentication protocol
- Leverage Active Directory password policies to unify Lotus applications
Learn more about Password Power's powerful, advanced functionality. |
|
|
|
|
|
|
|
|
|
|