[credit to : Benjamin Random ]
What a great image – filing away ‘head’ knowledge! Doesn’t that sum up nicely what knowledge workers are trying to do with all that electronic data and information they receive on a daily basis.
In my previous post I mentioned how services are offering automated categorization of content upon delivery via lexical analysis of the email address and subject fields.
As I use Lotus Notes as one of my main mail clients, I’ve written some code to automate this functionality to help me store away and reference particular content in more useful content stores or services than what I’m offered via the Lotus Notes client.
So this is my “HowTo” blog post with the custom Lotus formula language I’ve written to provide this functionality.
Warning and Caveat:
To add this piece of functionality to your own Lotus Notes client, will require a good degree of comfort and competence in customizing the Lotus Notes client and using Lotus Notes Formula Language. Therefore this is not for everyone. This post serves as a guide and reference to how I produced this functionality, and it is posted as such. I don’t take any responsibility for any configuration or customization you may decide to add to your own Lotus Notes client, or for the results that may occur.
Some helpful links:
The Lotus Notes version used : IBM Lotus Notes version 8.5.2 (but I believe the Formula Language utilized may be supported by previous versions – but this has not been tested).
Setting up the function via a Button on the Toolbar:
Lotus Notes has a configurable Toolbar:
This can configured via the Preferences section: (via File > Preferences > Toolbar > Customize)
I’ve chosen to add a new button to the “Universal” Toolbar:
Press “New” and select “Button…”
This brings up the “Edit Toolbar Button” Dialogue:
Fill in the “Button caption text”, and “Popup help text” as required.
I’ve created these icons to be used on the toolbar – but you can add |make your own they should be (16×16 px)
Change the icon via the “Change Icon” button:
This brings up the “Insert Image Resource” Dialogue:
If you wish to add an new icon – press “New” and browse to the selected file (by in mind the supported file types)
Then find in the list of images available via the “Insert Image Resource” Dialogue: and press OK
This what I’ve done as the Demo version:
Adding the Formula Language code to the Button:
This is the Formula language part you need to customise to your preferences and add into the Formula window:
Select and Copy Below:
Select and Copy Below:
BMSubj := Subject;
BMAddress := @Prompt([OkCancelList]; “Blog & Mail Forwarding Service“; “Select the destination address for the mail delivery“; “”;”[username]@m.evernote.com“:”email@example.com“:”firstname.lastname@example.org“:”email@example.com“);
evernote“); @Do(ENWorkbook := @Prompt([OkCancelList]; “Select a Workbook“; “Select the Workbook for the Mail Delivery“; “Work“;”Evernote“:”My Stuff“:”Work“); ENTags := @Prompt([OkCancelEditCombo]; “Select Tags“; “Select a tag for this note, or type in multiple tags required prefixed with ‘#’ and separated by spaces “; “#Work“; “#Evernote“:”#My Stuff“:”#Work“;””); Result :=@Prompt([YesNo];”Click Yes to confirm:“;”Destination address: ” + BMAddress + “ and subject: “+ BMSubj + ” @”+ENWorkbook+ ” ” +ENTags); @If(Result=1;@MailSend( BMAddress;””; “”; BMSubj + ” @”+ENWorkbook+ ” ” +ENTags; “”; “Body” ;”” ); “”);@If(Result=0;@Prompt([Ok];”Delivery Cancelled“;”No Mail Sent“);””);@If(Result=1;@StatusBar(“1 email sent to “+ BMAddress + “ with subject: ‘” + BMSubj + ” @”+ENWorkbook+ ” ” +ENTags +” & mail moved to [MyFolderName] folder.“);””));””);
posterous“); @Do(PTags := @Prompt([OkCancelEditCombo]; “Select Tags“; “Select a tag for this note, or type in multiple tags required separated by commas “; “posterous“; “work“:”personal“;””); Result :=@Prompt([YesNo];”Click Yes to confirm:“; “Destination address: ” + BMAddress + “ and subject: “+ BMSubj + ” ((tags: ” + PTags + “))”); @If(Result=1;@MailSend( BMAddress;””; “”; BMSubj + “((tags: ” + PTags + “))”; “”; “Body” ;”” ); “”);@If(Result=0;@Prompt([Ok];”Delivery Cancelled“;”No Mail Sent“);””);@If(Result=1;@StatusBar(“1 email sent to “+ BMAddress + “ with subject: ‘” + BMSubj + “((tags: ” + PTags + “))” + “ & mail moved to [MyFolderName] folder.“);””));””);
@If(Result=1;@Command( [Folder] ; “
[MyFolderName]” ;”1″ );””)
End Select and Copy
To help personalise the code for your own use , I’ve put together this colour-coded key as a guide.
Formula Language Text Annotation notes:
Black font:- Formula language and key variables – only change if competent and knowledgeable about Lotus Formula language and structure.
Blue font:- Editable & Configurable text for items such as dialogue titles, pop-up messages, or selection menus and service paramaters (e.g. evernote workbook names)
Fuchsia font:- Indicates logical programmatic flow based on highlighted value – therefore “evernote” section handled by @If statement set up to handle evernote based service parameters. Therefore other services can be added to this code in a similar manner.
Red font:- Indicates Lotus Notes folder name to be inserted into code to give destination folder of processed documents.
Once pasted into the formula (with any adjustments you require)
Press the “Green Tick”, to run the code checker and then press “OK”.
Re-order the icons on the Toolbar to you requirements and then press “Save Toolbar”.
That completes the process of add the button to your Toolbar.
How the Button Works:
With a memo selected in the Inbox view (or other view), click the button icon in the Toolbar – it should come up with the following prompt:
Select the service you require and press “OK”
Follow the dialogue prompts that appear…until you get to a ‘Confirm for Delivery’ prompt like this:
Press “Yes” if you wish to proceed at this stage, other press “No”.
Pressing “No” will cancel the action and confirm that with the message:
Pressing “Yes” will send the message and confirm that with the message that will appear in the Notes client status bar, and the processing memo should be moved to the destination folder specified within the code.
I would advise testing the adjusted code with dummy or test message until you can verify the action works as you require and has successfully completed a delivery of content to a service of your choice.
I hope you find this useful.