Track modification history

I need to display each time a document(form) is modified. The goal is to show the user and datetime when a specific field is modified. For example, when the security radio button is changed from No to Yes, capture and display the user that clicked the button and when it was done. Subsequently, if another user clicks(changes) the button, I’d like to display it also, but don’t replace the original modification history. Any ideas?

Subject: LotusScript in a QuerySave or @Formula

Let me know which way you want to do it and I can post some options.

Subject: RE: LotusScript in a QuerySave or @Formula

I am very new to Lotus, and trying to create the database using others as an example; never any training on Notes. So, whichever way is the easiest! Thanks

Subject: track modification history

We use two different kinds of history information :

  1. A complete tracking, where Username, Date and Time of the modification and old and new value of all modified fields are listed. To be able to do this kind of tracking you need every field twice in the document, once as visible data field and once as hidden history field. When saving the document you have to compare each data field with its history field and list differences in a visible history log. This process can be very long and the calculating formula too. Then the new value has to be copied to the history field. As the history log field cannot exceed 64k you have to limit the number of entries, otherwise you cannot open the document anymore.

The same history information can be achieved without having to duplicate the fields you want to track by creating an array in the Postopen event of the form, either using the form.fields property or a hidden field on the history subform containing the fields you want to track and creating your array using the fields’ values. You then compare the values stored in the array to the values in the uidoc in the Querysave event of the form. The only disadvantage is that the history contains the fields’ real name and not a customized one, so you have to name your fields to be understandable by the users.

  1. A simple tracking, where Username, Date and Time and kind of modification are listed. The simple tracking is defined in a subform in the database and can be copied to any new database and then adapted for special use in the new database.

Note that you cannot track changes on RTF fields with these methods.

If you need more details, email me to patrick_montavon AT aisa.com. I’ll be able to provide them after returning from vacation on June 28.

HTH

Patrick

Subject: track modification history - via NotesTracker

See a general-purpose toolkit for tracking for this and othe database usage tracking funtions, called NotesTracker:

(1) in the IBM Global Solutions Directory at http://www-304.ibm.com/jct09002c/gsdod/solutiondetails.do?solutionId=9802&lc=en or

(2) at http://asiapac.com.au/ or

(3) at http://notestracker.com/

Subject: Actually a much easier way…

To be able to do this kind of tracking you need every field twice in the document, once as visible data field and once as hidden history field.

Create a copy of the document that you never save in the PostOpen event.

Globals for Form

Dim oldDoc as NotesDocument

PostOpen

Set oldDoc = db.CreateDocument

Call curDoc.CopyAllItems(oldDoc, True)

Subject: RE: Actually a much easier way…

Bill, nice little trick. But how can you compare the value of two RTFs using LotusScript?

Subject: Notesitem.AppendToTextList or formulas like…

On change field or another event:

_datestate:=@If(datestate=“”;@Now;datestate:@Now);

_state:=state:“state changed”;

_stateuser:=stateuser:@username;

FIELD datestate:=_datestate;

FIELD state:=_state;

FIELD userstate:=_userstate;

@Command([FileSave]);

@Command([CloseWindow])