What items were changed?

From: Chris Jordan <mail_at_mailer.com>
Date: Sun, 17 Oct 1999 03:21:28 -0400
Message-ID: <MBdO3.4658$%E3.165360_at_wbnws01.ne.mediaone.net>



Hi,

[Quoted] I have a form which records data into a COMPANY table. Now, say if there is some modification that needs
[Quoted] to be made on CompanyX. CompanyX just got sold and is now called CompanyY. So the user opens the
form, and changes the company name from CompanyX to CompanyY, and then saves the form. Is there
[Quoted] any way for us to track the fact that a change was made. And it could be any type of change that was made on
the record, not just name change?

I was thinking of creating a separate table called COMPANY_HISTORY(date,companyid,fieldname, oldfieldvalue,newfieldvalue). Then when-update-item fires, storing all the 17 field values of the current [Quoted] record into 17 temporary global variables. And when post-commit fires, comparing each of the 17 fieldvalues
with what is stored in those global variables. If any item doesn't match, add it onto the COMPANY_HISTORY
table. It seems like this can work, but rather clumsily, since I have to enter 17 if-then comparisions for each
field. Is there better solution to track the changes that are made onto a [Quoted] database record (from the form)?

The idea is so that when the users are going thru the companies, they can click on the history button, and up comes a list showing exactly what was modified on this company, who modified it, and when was it modified.

Thanks,
Chris Received on Sun Oct 17 1999 - 09:21:28 CEST

Original text of this message