Alternative design patterns for sections

Sections in Lotus Notes applications are primarily used to organise documents containing a lot of information where multiple design elements or paragraphs are collapsed into a single line. For this purpose IBM provided us with a basic set of formats.

Lotus Sections
These formats however do not always fit the style of a modern application. But fortunately there are alternative ways. Take a look to the pictures below showing a collapsed and an expanded section in one of my recent applications.

Collapsed Section

Expanded Section

It should be easy to guess that the expanding and collapsing is done in clicking the plus/minus signs with the mouse. But how does that work and how does the background code look like? The plus/minus signs are nothing else then image resources placed within two paragraphs that are hidden depending on the value of a field named $History. If the value of the $History field equals “1” the minus sign is hidden, equals it “2” the plus sign is hidden. The same happens for the table containing the txDocumentHistory field. If the value of $History equals “1” the section containing the history is hidden.

Section Design

Each picture acts as an action hotspot with the formula

FIELD $History:="2";
@Command([RefreshHideFormulas])

for the plus sign and

FIELD $History:="1";
@Command([RefreshHideFormulas])

For the minus sign.

The name of the field does not really matter as long as it does not interfere with an internal Lotus field. The advantage of using it as a system field (with the leading dollar symbol) is, that the user does not get questioned whether or not (s)he wants to save the document after the document is requested to be closed from edit mode after using the action hotspots to show/hide the section. Someone may remember this behaviour from programmed tables.
Whereas the approached described definitely cannot be used to create access controlled section it is a good alternative to the half a dozen basic design provided by IBM where the main possibility to customize a design is the colour and the font type.

I presume there are much more solutions out there where the design of a Lotus Notes application can be made much more flash looking than the much to frequently to find pre-R6 design 🙂

2 thoughts on “Alternative design patterns for sections

  1. this is my first visit to your website and I’ve already found a jewel. I didn’t know about changing the leading dollar sign field and not being asked to save the document. I know about the system fields but never was creating one. I learn something new every day.

    thanks

  2. Christian, this is awesome, particularly as Voytek points out because of the $Field no prompt for save trick that I didn’t know about either.

    As for controlled access sections, I don’t see why you couldn’t put one “inside” your “fake” section and just hide the section header completely. I do this in SuperNTF on all the configuration forms.

    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *