Contact Information

Chris Toohey

Like what you see? Help feed-the-beast by donating to the site and its humbly thankful author!

My Twitpic Updates
    Site Resources

    RSS Site Content
    Syndicate This Site!
    DG Banner Logo
    Advertisements
    Adding Admin-defined Color-coding to Lotus Notes View rows via Color Profile Documents

    01/05/2009 10:47:50 AM | Chris Toohey | Bethlehem, PA

    While working on the Public Build Event Calendar project, I found myself adding two things to the application that I thought might prove useful to Lotus Notes client developers. The first I'll discuss today when we cover how you can use a simple Profile document to apply View row color-coding logic to your Lotus Notes applications.

    For those if you who are -- like me -- more visually minded:

    Admin-defined Color-coding Lotus Notes View rows

    I'm using my Preferences example application as my springboard here, which will allow me to easily:

    1. Define a runtime formula that will evaluate against the NotesDocuments in my color-coded NotesView in my "Preference" NotesDocument through a combination of Color Fields, Text fields to store my templated Formula and my @ReplaceSubString-evaluated runtime formula.

      The runtime formula Formula is then written into a Profile NotesDocument (which I've named "colorprofile"), into a NotesItem on that Profile NotesDocument (which I've named "colorstatus").

    2. In my target NotesViews, I create a hidden ViewColumn, specifying that this column is to "Use value as color", that it is "User definable", and that "Profile Document" that holds the runtime formula for the Color-coding matches the same name of my Profile NotesDocument ("colorprofile").

      Additionally, on the Advanced tab in the Column Properties, I make sure that the Programatic Name of said Column matches that of the defined NotesItem on the "colorprofile" storing the runtime formula I wish to use for this particular NotesView (ie., "colorstatus").

      I then specify a simple Formula for the Column that will allow me to (should I choose) specify a unqiue color scheme. In this case, I'm using @UserName.

    3. Now, at runtime, my runtime formula is evaluated and the color-coding applied to my NotesView!

    Color-coded, Admin-defined Lotus Notes View

    For those of you who -- again, like me -- prefer a hands-on demo:

    Adding Admin-defined Color-coding to Lotus Notes View rows via Color Profile Documents - Example Download

    The aforementioned second topic - which I'll try to get out tomorrow - will have us creating a simple Calendar-type NotesView, and using the RegionDoubleClick Event to pre-set the Starting Date and Time of a new NotesDocument based on your location/region at the time of your double-click! This approach is discussed (and used) in the Event Calendar Public Build project (Episode 2, I believe) - so if you want to you can check that out now!


    Like what you see? Help feed-the-beast by donating to the site and its humbly thankful author!

    Comments

    Keith Strickland
    http://www.keithstric.com
    01/05/2009 05:30:53 PM

    Nice Chris! Have you been able to figure out how to highlight the selected row in a view like in the Notes 8 Standard client/mail template? I spent a couple of days on this and never was able to figure it out.

    Keith



    Add a New Comment


    (Not Published/Public)
    Remember my Information!

    (Enter the text from the image to proceed)

    (Full markup allowed in the comment field below; play nice!)

    Live Comments Preview