Ahh.  Another Hoosier!
 
You may have already thought of this, but why not just save the entire FORM scope (before and after) to your log?
 
But, if you want a CFC approach, someone, I think Barney, recently mentioned that he has a process of checking for values that are changed within a CFC's instance variables.  If the values are not changed, he does not perform any database interaction when the user attempts to save an unchanged record.
 
You might employ some of the same techniques for your needs.
 
Or, you could create a CFC that accepts both the old and the new form values, loops over a list of instance variables, then sees if the values are different.
 
You will obviously need to watch out for "optional" form fields such as radio buttons and checkboxes.
 
Personally, I like the simplicity of storing the entire FORM scope, other than the fact that it could/will take up a considerable amount of storage.
 
M!ke


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Flynn, Robert E
Sent: Saturday, November 26, 2005 9:54 AM
To: [email protected]
Subject: [CFCDev] logging form changes

We are looking to log changes that are made to some internal forms. There are a number of fields on a page and there is no telling what someone might change at any given moment. What we were thinking of doing was creating an object on page load that would hold all of the incoming values and then when they update the page create an object with all of the outgoing values. We’d then pass them to a CFC that would compare the differences and write to a log the page, record number, changes (on row per change), time and username of the person making the change.

 

I KNOW this can’t be an original thought or even an original approach. I’m wondering how others deal with this issue and what resources or postings for this kind of thing might be out there. Any advice or recommendations greatly appreciated.

 

Bob

 

____________________________________________________

Bob Flynn

Associate Director of Information Systems Technology

Systems & Accounting Graduate Programs

Indiana University Kelley School of Business

1275 E. Tenth Street, Suite 2000    [office] 812/855-5509

Bloomington, IN 47405-1701        [fax] 812/856-4123

http://sagp.kelley.indiana.edu/   [email] [EMAIL PROTECTED]

 

Manager, Indiana University Macromedia Users Group

http://iummug.indiana.edu

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to