Search DominoPower's 11,437 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
PROGRAMMING POWER
A flexible approach to keeping a history of recent edits
By Jonathan Coombs

Notes' document-based database design is well suited to managing business and workflow documents, which are often edited by various users at various times. As these documents go through this editing process, it's often useful to track who did what to each document, and when. In some cases, full version tracking is necessary, but often a simple table of rows listing the editor, date, and description will suffice. This article presents a flexible way of implementing the second approach using a single subform.

The sample database I'm providing at my Web site (at http://www.bigfoot.com/~jonathancoombs) contains a directly reusable Editor History tool, as well as some sample design elements to illustrate its functionality. I have seen many different edit history subforms in various Notes applications. The difference with this tool is that it combines several features into a single tool in order to reduce the number of tools that need to be maintained.

Implementation
This subform combines most of the functionality I've gleaned from the various editor history subforms I've seen. Typically, each flavor has certain hard-coded settings, such as the number of recent edits to display or the rules that determine when rows are generated.

For this tool, I picked my favorite combination of features and set it as the default. You can simply download the subform and plug it into a form, and it will work using the default settings. That is, it will store the last five editors and dates in a sort of "sliding window," as seen in Figure A.

FIGURE A


The default settings in action on the Notes client. Roll over picture for a larger image.

Every edit will generate a new row, and it will not prompt each editor to enter a description before saving. If you want to adjust any of these settings, you can add hidden control fields to the host form in which you placed the subform. These special fields can control the size of the sliding window, how often to create multiple rows if the same editor saves several times in a row, and whether to enable the Edit Descriptions feature.

Design standards
Before walking through the design and code behind the Editor History subform, I should explain some of the design standards I've used and part of the rationale behind them. The Edit History subform designer client is pictured in Figure B.

FIGURE B


Here's the Edit History subform designer client. Roll over picture for a larger image.

To minimize confusion, I have made all hidden fields small (8 point) and gray, and I've included bold labels next to each in case they need to be viewed for debugging or testing. I have also added a prefix to each field name--"f" for stored fields and "fd" for display fields--to distinguish them from field names that have special meaning in Notes (e.g., Form, SaveOptions, and Server_Name). An additional "EH" prefix causes the fields to sort together in the document properties box, and it protects against duplicate field names between the subform and its host form.


1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Lotus Technologies > Application Development (48 articles)
   An application for scanning physical mail and distributing it virtually
   How hide-whens in Rich Text can ruin your whole day (and what to do about it)
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
Adding Quick Highlighter support to IBM Lotus Notes Domino Wiki, Weblog, or Webpage
Remember Young Admins...there are 2 files
WebSphere Portal 6.1.0.2 and Lotus Domino 8.5
The CKEditor - with Domino
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login