Skip to main content
    Country/region select      Terms of use
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

Two important matters I wanted to discuss.

First, I saw a question in the 6 & 7 forum about not being able to deselect the "web display" options on design elements, referring to this technote. The problem is that Designer is adding the $item that contains the options when you select them, but not removing the item when you deselect them. The fix for this is a technique of possible general usefulness when dealing with design elements, so I thought I'd discuss it briefly here.

Basically, when you have a design element open for editing, the design note is the "current" document as far as executing formulas is concerned. So you can use a formula to change the field values of the design element. In this case, we needed to remove the $WebFlags item with a FIELD statement. This affects the design note on disk. Then, to prevent the user (me) from forgetting and making some changes to the design note as long as it's open in front of them, I like to close the window (I couldn't think of anything to prevent the user editing the design element before using this control -- I don't like to save it without warning).

FIELD $WebFlags := @Unavailable;

This formula can be in a toolbar icon or (this is my preference) in the Designer Tools menu. I have the impression that this feature is not much used, but here's a perfect chance to use it. In the situation we're considering, we want a control that's only available when editing a view or folder. So look under Tools, and you'll see the choices Add Tool... and Customize Tools... -- in this case you want Add. Then enter a name, the above formula, select the contexts in which this new menu item will be available (View Design and Folder Design) and Bob's your uncle.

Secondly, while I'm not a fan of Christmas, this was so bizarre that I had to share it. This is me, "elfed".

By the way, I'm a little surprised there was no response to my post about the ReportGenerator class now handling tables. I'm really quite pleased with it, even if I do say so myself. Check out the code sample in the linked-to page, which shows how it makes it fairly simple to create and fill in a table.

Andre Guirard | 22 December 2007 06:24:00 PM ET | Espresso Royale, Minneapolis, MN, USA | Comments (1)


1) Much appreciated
Dan Soares | 12/25/2007 10:29:51 AM


Many thanks for all the brilliant samples of code you provide us.

I don't think the lack of responses is in any way indicative of the quality of the post :)Probably just because of the holiday season and generally busy schedules.

Looking forward to using that code when I get back in January and also to seeing you at Lotusphere.


 Add a Comment
Comment:  (No HTML - Links will be converted if prefixed http://)
Remember Me?     Cancel

Search this blog 


    About IBM Privacy Contact