Wonderful widgets

Despite the small version number increment, there’s a heap of new stuff in Notes / Domino version 8.0.1 (made available this week). There’s some new compression technology which can see your mail box and other valuable Notes application shrink in size by around 35%. There’s some new stuff in the calendar form, like a dedicated place for conference call information rather than putting it in the subject field… get the picture? You know who you are. Sametime 8 is integrated throughout the client, the Symphony editors are mail-enabled, and there’s the Quickr side-shelf (once Quickr 8.1 is made available later this quarter). On the Domino server there’s free in-the-box mobile e-mail in the form of Traveler.

Notes WidgetsHowever, the big new feature is ‘My Widgets’ – but I should say “features” as My Widgets is a set of capabilities. Here’s what you can do:

  • Add a Notes view, web page, RSS feed or Google Gadget to the Notes sidebar – the cool thing about this is that the sidebar is no longer necessarily the domain of the developer, it’s in the hands of the end user.
  • See recognised ‘live text’ which has associated actions – and create your own recognisers to recognise items which are important to you. More on this later.
  • Associate your own actions with selected text – see below.

widgets2.gifMy frolleague and long-time Lotus stalwart Alan Lepofsky posted (internally to IBM) some examples of widgetising your Notes client, and I only had to look at one before getting the idea. The first thing I did was followed Alan’s example of performing a Wikipedia search on highlighted text from an e-mail. Easy. And following the same process I then created another action for finding a person in IBM’s corporate directory BluePages. And then a highlighted word in dictionary.com – this was all too easy. How about a bit more of a challenge?

So, wouldn’t it be cool if you saw a postcode in an e-mail or calendar appointment, and that postcode was ‘live’ so that clicking on it plotted the location on a Google map? Answer: yes.

Okay, the first thing Notes had to do was recognise the text. UK postcodes (usually) have a format like TW18 3AG. A bit of hunting in Dogear (part of Lotus Connections) produced some info on recogniser formats, and thus a UK postcode requires the following format:

[A-Z]{2}[0-9]{2}[ ]{1}[0-9]{1}[A-Z]{2}

Once this recogniser has been created, Notes will put a green dotted line (default option) under postcodes and any other text it recognises. But now you need an action to go with the recognised postcode. The key to doing this is to grab the format of the URL that Google Maps (UK) will use – so for Lotus Park in Staines it will be:


widgets3.gifYou then create the widget via the ‘Getting started with widget’s toolbar button and select ‘Web Page’ from the list. Hit ‘Next’ and then select ‘Web page by URL’ and paste in that URL. Hit ‘Next’ again and then select ‘This Web Page’. Hit ‘Next’ again, the web page will display, but carry onto the next stage. Edit the component name, and then you see that one of the input field contains TW18 3AG. Turn on this field with the check box, but remove the postcode from the right-hand side to leave the field blank. At the bottom select ‘ Wire as an action’ and hit ‘Next’. In the next stage you utilise your recogniser by selecting ‘Recognised content’ and then ‘Postcode’ from the drop-down list (you can create a new recogniser at this point). Select where you want to see the results – sidebar panel, new window, floating window or new tab, that’s up to you. Hit ‘Next’ and you’re finished.

Now you can go find a postcode somewhere and try it out. The picture above shows a right-click, but you can set the action going with a single left-click.

Addendum: some UK postcodes have only digit in the first set (e.g. SE1 9PZ), so the recogniser expression needs an ‘or’ operator (|) followed by the other possible expression, as follows:

[A-Z]{2}[0-9]{2}[ ]{1}[0-9]{1}[A-Z]{2}|[A-Z]{2}[0-9]{1}[ ]{1}[0-9]{1}[A-Z]{2}


Note: I’m closing this post for comments as for some reason it’s attracting spammers’ comments (which are being blocked, but I have to clear them out). I’m guessing that after six years all of the legitimate comments have been made.


  1. Darren

    I have tried following your instructions, but get stuck trying to configure the widget. I’ve tried this a number of times for different sites and I’m obviously missing something.

    After I select ‘Web page by URL’ I paste in your exampole URL. I hit Next, choose ‘This Web Page’ and next again.

    After that, I get a box with the web page displayed, but the Next and Finish buttons are greyed out. At the top it has the text ‘Modify the URL as needed so that it contains the appropriate parameters.’ Below that is a field with the URL and a button labelled ‘Load URL’

    Any attempts
    Where am I going wrong.

  2. I did get this working – I found I had to put something in the search box on the map page (inside the dialog box) and click the search button. The Next button was then active.

  3. Also, I found that sometimes I had to press Back and then Next to get the next Next button to become active.

    By the way, the Turtle Partnership and Chris Miller of Connectria have set up a public widget directory – see here…

  4. Ah, I’ve discovered something important. When you transfer a widget it will also take the recognisers it needs with it. Therefore if you pull the Google Maps / postcode widget from the public catalog you won’t need to create the recogniser. That’s neat.

  5. Loved this Darren and spent a very enjoyable hour setting up widgets to make full use of Notes capabilities. Thank You.

    I Would suggest this tweak to UK Postcode recogniser though to handle E14 4AD style codes:

    [A-Z]{2}[0-9]{2}[ ]{1}[0-9]{1}[A-Z]{2}|[A-Z]{2}[0-9]{1}[ ]{1}[0-9]{1}[A-Z]{2}|[A-Z]{1}[0-9]{2}[ ]{1}[0-9]{1}[A-Z]{2}

    I now have postcode recogniser used in a dashboard for
    BBC Weather at that postcode
    RAC Routerfinder to that place
    Google Maps of that postcode

    So simple yet powerful, but without your blog it would have been hidden. If I had time and knowledge I would submit these for others to use as it is so universally popular !

  6. Hi Darren,

    I’m tried following the instructions you posted but for some reason, the postal code is not recognized. I’m not sure if there’s anything that has to be configured from the Domino side. Appreciate any reply.



  7. Mark, thanks for the update, I became aware that my code missed out a few formats. RAC Routefinder is a good one. Someone suggested the nearest Starbucks, but I couldn’t get that to work (that’s a challenge thrown down).

  8. Hi Darren,

    Thanks for the reply. Yes, that was the first thing I did before I started configuring widgets. I tried using a different recognizer (not the one that associates the component to the ‘q’ field) and it does recognize the post code now. But I’m wondering if there’s any chance it would recognize the whole address.


  9. Have followed the steps above to create the post code widget.
    But I am not getting the green line under post codes that i look at in lotus notes.
    I have live text turned on in preferences, am also running Lotus Notes 8.5 client and server
    Any ideas please

  10. Martin, I don’t know then. It’s always just worked for me. Couple of things… in 8.0.1 live text doesn’t display in a preview until you actually click inside the e-mail. Second, you don’t get live text in HTML e-mails (unless you turn off display via the embedded browser) but should do in Notes-to-Notes e-mails.

  11. A better reg ex for UK Postcodes is as follows:

    (GIR 0AA)|((([A-Z-[QVX]][0-9][0-9]?)|(([A-Z-[QVX]][A-Z-[IJZ]][0-9][0-9]?)|(([A-Z-[QVX]][0-9][A-HJKSTUW])|([A-Z-[QVX]][A-Z-[IJZ]][0-9][ABEHMNPRVWXY])))) [0-9][A-Z-[CIKMOV]]{2})

  12. Also, check Wikipedia for other regexes…


    There is also a regex on the Royal Mail Group web site, somewhere, although having just searched I couldn’t find it. But it is there… somewhere.

Comments are closed.