Archive for April, 2008


Dynamically loading subforms

April 17, 2008

I’m sure many Notes developers have gone through this problem before: “I want to load a different subform after the form is loaded”. Unfortunately, Notes doesn’t let you do that, and so ways have to be found around this… layers, hide/whens, sections, programmatic tables, etc.

But let’s say you reeeeaallllyyy want to dynamically load a subform, for example, when the user selects a value from a dropdown box. Here’s a way of doing it, supposing the default subform is “sfm_Default” and the subform you want to load comes from that dropdown box.

1. Make your computed subform take the value of whatever’s on a computed field (called for example fld_WhichSubform)

2. Put the following code on a button that should be called (via JS for example) when the dropdown box (called for example fld_DropDown) value changes:

@SetProfileField( “fm_FakeProfile”; “fld_PSubForm”; fld_DropDown; @UserName );
@Command( [ViewSwitchForm] ; Form )

(Any unique key that will correctly identify the document will do for the @SetProfileField. @Username is but a suggestion, @text( @DocumentUniqueID ) could be used as well)

3. Give the following formula to your fld_WhichSubform computed field:

x := @GetProfileField( “fm_FakeProfile” ; “fld_PSubform”; @text( @DocumentUniqueID ) );
@If( @IsError( x ) | x = “” ; “sfm_Default”; x )

This is but a simple example, and more interesting/complex things can be done with it.

Note: for this method to work, the document has to be saved. A @Command( [FileSave] ) before the ViewSwitchForm might be necessary in some circumstances.


Just for fun…

April 11, 2008

I just got reminded from Steve McDonagh‘s blog of this “Album Cover” game. The rules are simple:

1. Go to the Wikipedia random article page . The title of the article is your band name.

2. Go to the very last quote on random quotations . The last four words of the last quote are your album title.

3. Go to Flickr’s “interesting photos from the last seven days” page . The third picture on the page is your album cover.

4. Add them together and you’re done. 🙂 Voila, here’s mine:


My story with Lotus Notes

April 8, 2008

Some of you might wonder why I mentioned “Collaboration” on the “About” page of this blog.

A huge percentage of my worklife has been dedicated to a collaboration platform called Lotus Notes. How did that happen? Well recently there has been a meme/trend going

around in the Lotus Notes community with many bloggers mentioning how they got into this same bandwagon, so I guess it’s my turn

Flashback to my homecountry, Portugal, in 2000 or so, I was in college studying Computer Science, and we had a “course” on the 4th year which involved doing a project for a

company. Of all the companies we could choose, I picked one called Salvador Caetano IMVT (one of the biggest portuguese privately held companies) that was really close to my

wife’s work and acceptably close from home.

So Salvador Caetano at the time had two available projects, one for SAP and another for Lotus Notes. Someone from the inside advised me that the Lotus Notes project was more

interesting so I took it on. Now as you all know, “Lotus Notes” is not something you hear about in college, so I bought a book about it and started to read.

So I started in December 2000 getting some training in Lotus Notes 5 (although the company was finishing it’s upgrade from, iirc, 4.6.1) and started the project soon after, the

design of a workflow application for computer hardware purchasing based on application requirements. Besides working on this project, and since the existing Notes team in the

company was composed of one person only, I soon started to assist him in Notes Administration issues as well.

The project ended in mid-2001 and the company liked my work, so they hired me for a 3 year contract as a Notes Developer and Admin.

After those 3 years, I moved to a consulting company called Artsecrets TI, a small software house that sold both IBM and Microsoft products. Despite the constant running around, I found the work as a consultant very rewarding, as I got exposed to different systems and solutions every day from different customers, so although most of my work at Artsecrets was done as a Notes Developer (mostly R5, but some ND6 as well), I had the chance to use other tools and application platforms as well.

After some time I decided to seek Fame, Fortune and Glory (OK, not really, just some better quality of life) outside of Portugal so I ended up accepting a position of a Lotus Notes Programmer Analyst at APC (now Schneider Electric). Things have been working well for me here and after less than two years I’ve gotten a promotion to Team Leader – which means I don’t have as much time as I’d like to look into the technical side of Notes since I have to look at metrics and task assigments and…  but ah well, I can’t complain. 🙂

So for those that didn’t know me, here’s my story with Collaboration and Lotus Notes.  I still look at Notes as a kick-ass appdev platform, so hopefully I’ll be able to in the future use this blog to occasionally participate on Show and Tell Thursdays (SnTT’s) with some nifty Notes Dev tips


Book review – “Dawnthief” by James Barclay (The Chronicles of the Raven vol. 1)

April 5, 2008

Right, haven’t had enough time to write on this blog so I decided to start with something non-controversial, like a book review 🙂

Dawnthief, by James Barclay is the first book on the “Chronicles of the Raven” trilogy. The story revolves around a group of mercenaries, The Raven, who suddenly find themselves in a world-saving quest much different from the usual jobs for money they normally take. This might somehow be reminiscent of Glen Cook‘s “The Black Company“, but unfortunately I haven’t yet managed to grab it on this side of the pond.

The setting for the story itself is pretty much a normal fantasy setting with swords, magic, elves, dragons, etc. There is some dimensional travel as well, but it isn’t taken into much detail in this book.

Balaia, the continent where the story develops, is a big rectangular island, with a chain of mountains separating the bad guys (Wesmen) on the West from the good guys on the East. Not the most inspiring of maps.

In terms of magic, there are 4 colleges of magic in Balaia and despite occasional dissent, they are mostly, in this book, in diplomatic terms with each other. The spells the members of each college casts seem to be the same, even though some of the colleges are more prone to cast certain spells – for example ForceCones seem to be used mostly, but not only, by Julatsan mages, and HellFires by Xeteskians. These spells are cast through creation of mana shapes, members of each college having to manipulate their shapes made of a different mana flow visible in a different color – an interesting concept.

The strong point of the books are definitely the characters. The members of The Raven aren’t perfect goodie-two-shoes like Aragorn (Lord of the Rings) or Drizzt (Icewind Dale), nor they’re anti-heroes like Thomas Covenant (Chronicles of Thomas Covenant the Unbeliever) or Inquisitor Glokta (The First Law). They’re humans and mercenaries, so they have their strengths and weaknesses and disagreements like any other human – or elf. Some of the characters that are not part of The Raven, like Styliann, also display an interesting personality and behaviour. Akin to George R. R. Martin‘s “A Song of Ice and Fire“, not all main characters make it to the end of the book, which makes a difference from the fantasy book cliches.

Overall, and mainly because the characters of The Raven are so interesting, I strongly recommend this book. I will soon review the 2nd book of this series which will surely reinforce my point 🙂