dominoGuru.com

Your Development & Design Resource

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

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!


About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of dominoGuru.com, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.



More from dominoGuru.com


dominoGuru.com is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, dominoGuru.com by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.