Friday, August 28, 2009

Lotus Technical University 2009 – my thoughts

I was going to semi-live blog from LTU which was held in Melbourne, Australia on the 26th – 28th of August, but unfortunately I was hamstrung by my laptop which seems to have moved into the mode where it can hold a charge for a grand total of about 10 minutes before it shuts down screaming feed me, feed me….

Overall, the event was good. As with most things there were bits which worked and bits which didn’t. Having been to the previous one in Sydney last year, I have to say this one probably didn’t quite measure up (and this is coming from someone who lives in Melbourne).

Perhaps my feelings are more because of the products rather than anything. This year it was all about ND 8.5.1 and Sametime 8.5 and Connections 2.5 etc etc. Whilst they all look good and I’m hanging out to get my hands on them, they are really just upgrades to existing products. Some of them are reasonably serious upgrades, but nothing staggeringly new.

There were some quite interesting sessions on Social Software and what IBM brings to the table (thanks Karen Tipping and Joey Bernal), but I still didn’t quite figure out how you manage the overlap between Quickr and Connections (particularly with the new version of connections). I’m not sure IBM have it worked out yet either. My guess is that eventually the two will just merge to be IBM Social Atlas or something.

There was a common thread around the “twitter” type status scenario which seemed to be saying that it was a beneficial thing in business as it gave others a look at the kinds of things you do, and that will give them an insight into the kinds of things you are knowledgeable about. I’m not sure that I’m buying it, but I won’t totally dismiss it until I try it.

Anyway, the

Good things

  • Connections 2.5
  • Sametime 8.5
  • ND 8.5.1
  • Good variety of sessions (admin, dev, strategy etc)
  • Web 2.0 strategy
  • Lotus Mashups – this is really the first time I’d seen this product live. It looks pretty good and I’m really looking forward to playing around with it. Nice work Peter Argent.

Bad things

  • Rooms not big enough for a lot of the more popular sessions
  • VMs not working in some of the labs
  • Machines not set up for labs
  • IBMers standing at the back of the room and talking over the top of Ed Brill’s keynote (very annoying)
  • There seemed to be significantly less people there this year than were in Sydney last year.

Things that could have made it better

  • Wireless connectivity for all!

Would I go again? I’m not 100% sure. I think next time I’d be more hesitant and I’d take a lot more notice of the agenda. I’m not worried that the same kinds of annoyances will happen again, as I’m pretty sure that the evaluation sheets handed in at the end will give IBM the idea that a fair few people were less than impressed with some of the problems. I suppose we’ll just have to wait until next year to find out.

What did you think? If you went, leave a comment.

Friday, June 19, 2009

Send an email with a button that has Lotusscript in it (Part 2)

And the winner is…….. DXL.

As expected, the “simplest” way to do this turned out to be creating the button with a bit of magic DXL. I stole the method and the skeleton of the code from Bryce Berry’s excellent article Create Hotspot Buttons on the Fly Using DXL. So I won’t bother going through all of that again here. I’d recommend you look at the article.

From this, I can create an email with a button. The other thing I might use it for is creating a form with a button on it so I can dictate which version of a document gets opened from a portal link. The basics will be the same, but instead of creating an email I’ll just create a document which has a button in a rich text field. Then that link (notes://whatever) can be generated and plonked down on an intranet page.

I’ll let you know.

Wednesday, June 3, 2009

Send an email with a button that has Lotusscript in it (Part I)

This is where I’m at today. I’ve been trying to figure out how (in Notes 6.5.x) to automate the sending of an email with a button in it which contains script which varies depending on certain criteria.

I’ve tried a few different ways to do it, all failing miserably. The one I’m going with at the moment (and the one that still looks promising) is to do it using DXL. By creating the DXL on the fly and then importing it back into the body of an email I should be able to get it to work.

I’ll post again when I get further……

Monday, April 27, 2009

Creating an agent to create an iCalendar entry

I have a problem where I want to create an agent in a db that generates an iCalendar feed that I can then add to my (and other’s) federated calendar in 8.5. The database which will host the agent is currently in 6.5 – which shouldn’t and hopefully doesn’t make a difference. Anyway, to test this out I created a quick dummy agent:

Sub Initialize
    Print "Content-type: text/calendar" & Chr(13) & Chr(10)
    Print ""
    Print "BEGIN:VCALENDAR"
    Print "VERSION:2.0"
    Print "PRODID:-//DTF//Projects//EN"
    Print "BEGIN:VEVENT"
    Print "UID:20090427T150000Z-12345@blah.blah.au"
    Print "SEQUENCE:0"
    Print "DTSTART:20090427T150000"
    Print "DTEND:20090427T160000"
    Print "SUMMARY:Nigel Test"
    Print "DESCRIPTION:This is the description"
    Print "TRANSP:TRANSPARENT"
    Print "END:VEVENT"
    Print "END:VCALENDAR"
End Sub

Pretty dull really.

Now, when I hit this agent with a browser, it asks me if I want to open or save – when I save it, then import it in an 8.5 client everything works wonderfully. It creates the entry in the calendar with the right fields etc.

But, if instead I try to add the agent as a calendar FEED to my client I keep getting the error:

net.fortuna.ical4j.Data.ParserException: Error at line 1: Expected [BEGIN], read [<html>]

Now, that would make sense if the agent wasn't rewriting the mime type to text/calendar, but I have checked the HTTP Header (using the browser) and it's right.

Any ideas?

I’ll be sure to let you know if I figure it out

Wednesday, March 11, 2009


I was reading the excellent developerworks article on 


and it got me to thinking about some work I did recently which used LotusScript to create an MS Excel document using xml. I find this approach better than using the com objects for a few reasons:
  1. It's much, much faster
  2. It doesn't have the problems you run into when your com object doesn't create, or fails for whatever reason
  3. It is platform independent (mostly)
The basic steps are

Create a file
Figure out how many rows and columns you have
Output the xml heading
Create some styles (much like you would with CSS)
Write out the column headings
Write out the data
Close the file
Open the file in Excel

It sounds easy when you say it like that but really, it's not that hard. Here's some example code for you 

Create a file
Open "c:\out.xml" For Output As filenum

Write out the XML heading
Print #filenum, {
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<ss:Workbook
xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
}

note there the magic " line. That's the one that tells it that it's Excel. Doesn't matter what the extension is (eg, you can call your file .xls or .txt or whatever), when windows sees that line it's like magic. If you are debugging your xml, you need to take that out otherwise it keeps opening in Excel which will drive you bananas.

Write out the Excel Properties
 Print #filenum, {
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>} & strUserName & {</Author>
<Company>Department of Treasury and Finance</Company>
</DocumentProperties>
}

Write out the styles
 Print #filenum, {
<ss:Styles>
<ss:Style ss:ID="Default" ss:Name="Normal">
<ss:Alignment ss:Vertical="Top"/>
<ss:Borders/>
<ss:Font/>
<ss:Interior/>
<ss:NumberFormat/>
<ss:Protection/>
</ss:Style>
<ss:Style ss:ID="Heading">
<Font ss:Bold="1" />
<Interior ss:Color="#D8D8D8" ss:Pattern="Solid"/>
</ss:Style>
<ss:Style ss:ID="Rating">
<ss:NumberFormat ss:Format="0.0" />
</ss:Style>

<ss:Style ss:ID="Dollars">
<ss:NumberFormat ss:Format="Currency" />
</ss:Style>

<ss:Style ss:ID="ShortDate">
<ss:NumberFormat ss:Format="[ENG][$-409]d\-mmm\-yyyy;@" >
</ss:Style>

<ss:Style ss:ID="YesNo">
<ss:NumberFormat ss:Format="Yes/No" />
</ss:Style> 
</ss:Styles>
}

Write out the sheet name
Sub writeXMLWorksheet
Print #filenum, {
<ss:Worksheet ss:Name="Referrals">
}
End Sub

Figure out how many rows and columns you have
Set view = db.GetView("ByReferralNumber")
strHeadings=("Referral Number,Dept Referral Number,Referral Type,Dept File,Department, Date Received")

varHeadings = Split(strHeadings,",")
intNumColumns = Ubound(varHeadings) + 1
lngNumRows = 1 + view.TopLevelEntryCount

Create the columns
Sub writeXMLCreateColumns(intNumColumns As Integer, lngNumRows As Long, vHeadings As Variant)
Dim i As Integer
Print #filenum,{
<ss:Table
ss:ExpandedColumnCount="} & intNumColumns & {"
ss:ExpandedRowCount="} & lngNumRows & {"
x:FullColumns="1"
x:FullRows="1">
}
For i = 1 To intNumColumns
Print #filenum, {<ss:Column ss:Index="} & i & {" ss:Width="} & 8 * Len(vHeadings(i-1)) & {" />}
Next

End Sub

Create the Header Row
Sub writeXMLHeaderRow(HeadingValues As Variant)
Print #filenum, " <ss:Row>"
Forall a In HeadingValues
Print #filenum, {<ss:Cell ss:StyleID="Heading">}
Print #filenum, |<ss:Data ss:Type="String">| & a & |</ss:Data>|
Print #filenum, "</ss:Cell>"
End Forall
Print #filenum, {
</ss:Row>
}
End Sub

Loop through and write the data
Sub writeXMLData(noteCurrent As NotesDocument, fnum As Integer)
Dim item As NotesItem
Print #fnum, {<ss:Row>}
Print #fnum, {<ss:Cell>}
Print #fnum, { <Data ss:Type="String"><![CDATA[} & noteCurrent.ReferralNumber(0) & {]]></Data>}
Print #fnum, {</ss:Cell>}
Print #fnum, {<ss:Cell>} Print #fnum, {<Data ss:Type="String"><![CDATA[} & noteCurrent.DeptRefNumber(0) & {]]></Data>}
Print #fnum, {</ss:Cell>}

Print #fnum, {<ss:Cell>} Print #fnum, {<Data ss:Type="String"><![CDATA[} & noteCurrent.ReferralType(0) & {]]></Data>}
Print #fnum, {</ss:Cell>}
Print #fnum, {<ss:Cell>}
Print #fnum, {<Data ss:Type="String"><![CDATA[} & noteCurrent.DeptFileNumber(0) & {]]></Data>}  
Print #fnum, {</ss:Cell>}

Print #fnum, {<ss:Cell>}
Print #fnum, {<Data ss:Type="String"><![CDATA[} & noteCurrent.DepartmentName(0) & {]]></Data>}  
Print #fnum, {</ss:Cell>}
 
Set item = noteCurrent.GetFirstItem("DateReceived")
Call writeXMLPrintDate(item, fnum)
End Sub

(for interest, here is the writeXMLPrintDate function)
Sub writeXMLPrintDate(item As NotesItem, fnum As Integer)
Dim ndt As New NotesDateTime("")
If Not (item Is Nothing) Then
Set ndt = item.DateTimeValue
Print #fnum, {<ss:Cell ss:StyleID="ShortDate">}
If Not (ndt Is Nothing) Then
Print #fnum, {<Data ss:Type="DateTime"><![CDATA[} & Format(ndt.LSLocalTime, "yyyy-mm-dd") & {]]></Data>}  
Else
Print #fnum, {<Data ss:Type="String">&nbsp</Data>}  
End If
Print #fnum, {</ss:Cell>}  
Else
Print #fnum, {<ss:Cell>}
Print #fnum, {<Data ss:Type="String"><![CDATA[ ]]></Data>}  
Print #fnum, {</ss:Cell>}
End If
End Sub

Then close your file off and open it up in excel. A cheats way to do this, as long as you know it works in your environment is to just do a urlopen on it.

ws.URLOpen("file://c:\out.xml")

And there you go. Simple and really flexible (you can write out formulas and all sorts of things). It seems to work in Office 2003 and 2007. I haven't really tried other versions. I've done the same thing with Word, but I imagine it would work with all of the products that read XML.

The other trick is, if you can't figure out what the XML is for something, just do it in Excel and then save the file as XML and reverse engineer it.

Last but not least, a handy reference is the Microsoft Office XML Spreadsheet Reference - which is great if you get lost.

Anyway, it's worth a try the next time you need to output something to Excel (or word etc). Leave me a comment and let me know how you go...

Friday, February 27, 2009

Sometimes you forget how cool this stuff can be

Over the last couple of weeks I've been building a little database for one of my customers. The reason I was doing it is that they were running a system in MS Access that wasn't suiting their needs, nor the requirements of their security and governance standards.

Anyway, I took a look at the app and thought about just upsizing it to SQL Server and rewriting the front end in VB or something, and that probably would have worked fine. I suppose it's a bit of my bias coming through, or even perhaps just because I'm more comfortable doing it, but after looking at what they were doing, and figuring out the data, the relationships and the workflow, I couldn't see any real reason not to do it in Notes.

1 week after making that decision, I've got the application up, it's far more functional than it's Access predecessor, it's more secure, it's more stable, it integrates with Excel (thanks to some XML), it contains all of the data from the old system (thanks to some ODBC to do the migration), and it's undergone almost daily iterations with the customer, with changes sometimes even being made on the fly in the meetings.

Now, I'm certainly not advocating this as a new software design methodology, and I also am neither saying that all Access apps should be in Notes, nor that I couldn't have done the same things in Access or VB/SQL, I'm sure that I could have. What I'm trying to say is that there is an awful lot of really powerful stuff in Notes that we sometimes just take for granted.

Once in a while it's good to go back to just an old school - non web based - stock standard Notes client based application to give you an appreciation of exactly what it is you have in your toolbelt. Sometimes you can even make the customers happy :-)

Friday, February 6, 2009

iNotes Ultralite on the iPhone


Ok, I promised, so here it is - my impressions of iNotes Ultralite on the iPhone (3G).

iNotes Ultralite is basically a very cut down version of (the much loved Domino web mail front end) iNotes, or as it was formerly known, Domino Web Access, or as it was even more formerly known, iNotes. 

Ultralite was developed specifically for mobile devices (and although IBM would probably deny it, let's be honest here, pretty much specifically for the Apple iPhone). Because it is a web based product, there are a number of advantages and disadvantages when you compare it to something like a Notes Traveller or CommonTime mSuite or similar. 

First, you have to browse the web for everything - even contacts. This is both a blessing and a curse. Nothing is stored on the phone, so if you lose it, you don't have all of those security concerns. But, it's kind of slow because you browse (although certainly not too bad if you have a 3G connection), and most importantly for those of us that don't live in the land of "all you can eat" iPhone data contracts, unless you can find a free WiFi to connect to, it uses expensive 3G bandwidth.

On top of that, while I'm ok with jumping on the web and logging in and clicking a few icons to get my email or even my calendar, I have to say, having to do it to get someone's phone number - while I'm on my phone - is a bit painful.

My other top bugbear because it works like this is that you don't get reminders for calendar appointments. This is a major one for me because I am the most forgetful person on the planet.

Once you are connected though, the UI is great. It's well thought out, well laid out, pretty much works exactly as you would expect - particularly if you use other iPhone apps. All in all, I'm really happy with it.

One thing you have to keep remembering is that it is a CUT DOWN version of mail. Because of that, there are things you can't do.

Overall, I really do like it, and I'm pretty happy with the functionality. That being said, I do tend to use it much more as a reader than a creator. For example, I never create appointments using it and I very rarely create emails on it (although I do reply a bit). 

I'm looking forward to the update to Traveller which will include the iPhone to see what it's like. I'll be sure to blog about that as well when I get it.



Wednesday, January 28, 2009

Boy Am I Bad At This Blogging Thing (and Notes 8.5)

Yep, I'm really bad at it. Sorry to my one reader out there. I've been terribly slack and I have no excuse other than it was Christmas, and I was on leave, and then I came back and I got the flu and then I went away for a couple of weekends, and it was Lotusphere (don't get too excited, I didn't get to go, I just played voyeur from afar) so I spent lots of time reading and not a lot writing.

Anyway, the big things that have happened (to me anyway) from a Domino perspective are:

iNotes Ultralite for the Apple iPhone 3G and
Notes/Domino 8.5

So, I, along with many of you I'm sure had been working with 8.5 through beta 1 and 2. I liked it, a lot. Obviously there were some issues, it was beta code after all. Anyway, as soon as it went to release I grabbed myself a copy and upgraded my clients.

My production client machine was running 8.0.2, and I went to do an upgrade. Initially it all looked fine, but in the end I had the same problem that I had on my test machine when I upgraded it from 8.0.2 to 8.5 beta 2 in that it just didn't seem to want to run. The splash screen would come up, but that was all. I waited and waited, but didn't get anywhere. So, nsd -kill, then Add/Remove programs and blow it all away, reinstall, fire it up and "Bob's your uncle" away we go. That was a few weeks ago now, and I have to say, every day I find more little things that I like. Of course there are also some that I don't, but overall I'm pretty happy. 

Obviously, the biggest change (for me anyway), is in designer. It's taken me a while to get used to it, but now I'm pretty happy with it. The only thing I've found irritating is that sometimes it seems to misplace my cursor. It's still there, and still responds (even though it's invisible) to the mouse and the keyboard, you just can't see it. Other than that though, as I said, I'm pretty happy.

xPages rock. I know a lot of people have been saying it for a while, and it's all a bit late, but they are fantastic. Anyone who does any web programming in Domino (and even notes programming in 8.5.1 apparently) will love them. They are really flexible, really easy and really good. If you haven't gotten there yet, ramp it up and have a go, you won't look back.

The other thing that I really like (mostly because my customers will love it) is the federated calendar stuff in the new mail template. I can't wait to upgrade the mail servers and the clients and get that out there. It's something that I've been getting asked for for a while now. The only disappointment is that I can't seem to work out how to federate a Quickr calendar and get that in there too. I'm not sure if it's just me, or whether it's just not there yet. I'll do some more investigation and let you know.

I'll post about Ultralite soon.

I promise I won't leave it this long next time :-0