Author |
Message |
David Morga #1 / 3
|
 Tracking record changes
I have two requests related to tracking record changes, any help GREATLY appreciated: 1. In FileMaker Pro you could create two special tracking fields, date created, and date modified. Date created seems pretty easy, just create field dtmNew and default it to now(). But how do I create a field that will record the date if any field in that record changes? 2. On some fields, I need to track changes specifically to that field. For instance, if someone changes the product price, I need to track the date of the change, the product, and old price. I can think of a couple ways to do this. When the field is changed in my form, then write appropriate information to a separate table, perhaps tblproductchange date,productID,changeField,oldValue,NewValue 11/13, 101, price, $1, $2 11/14, 101, name, widget, whatzit This should work for my needs, but I wanted to check with experts. I'm sure some of you have had similiar needs and identified more efficient solutions. Many thanks! David
|
Sat, 07 Jul 2001 03:00:00 GMT |
|
 |
<vik.. #2 / 3
|
 Tracking record changes
David, Sorry I can't quite answer your question but I do have a very similar need. Would you mind copying me if you get any interesting replies? Specifically, I have a buffer table that periodically copies to a much larger, archival table. This copy is time- and network-resource-consuming, and I really only want to copy records which have been added to the buffer table since the previous copy (easy) AND records which have been EDITED since the last copy (hard). My current best idea is: Every time the "archive" function is run, I record the systemdate in a separate table. Every time a record is added to "buffer", I record the systemdate as part of that record. The next time I archive, I only archive records with systemdate>lastarchivedate. This obviously has the weakness that EDITED records would not get re-archived. I've been trying to figure out how to get the systemdate to update in the buffer table record if any field in that record is edited. The only way I can figure out to make this happen, I would have to add code to the "on change" or "on update" event of every field. This seems undesirable because then, if I have 15 fields, the systemdate is going to get re-written to the table 15 times every time a new record gets added!.. Any ideas? Quote:
>I have two requests related to tracking record changes, any help GREATLY >appreciated: >1. In FileMaker Pro you could create two special tracking fields, date >created, and date modified. Date created seems pretty easy, just create >field dtmNew and default it to now(). But how do I create a field that will >record the date if any field in that record changes? >2. On some fields, I need to track changes specifically to that field. For >instance, if someone changes the product price, I need to track the date of >the change, the product, and old price. I can think of a couple ways to do >this. When the field is changed in my form, then write appropriate >information to a separate table, perhaps tblproductchange >date,productID,changeField,oldValue,NewValue >11/13, 101, price, $1, $2 >11/14, 101, name, widget, whatzit >This should work for my needs, but I wanted to check with experts. I'm sure >some of you have had similiar needs and identified more efficient solutions. >Many thanks! >David
|
Sat, 07 Jul 2001 03:00:00 GMT |
|
 |
Dev Ashis #3 / 3
|
 Tracking record changes
Hi David, You might want to download the sample History.exe database from my website (Resources/Downloads sectioN) as I think it addresses these questions directly. HTH -- Dev Ashish (Just my $.001) --------------- The Access Web ( http://home.att.net/~dashish ) ---------------
:I have two requests related to tracking record changes, any help GREATLY :appreciated: : :1. In FileMaker Pro you could create two special tracking fields, date :created, and date modified. Date created seems pretty easy, just create :field dtmNew and default it to now(). But how do I create a field that will :record the date if any field in that record changes? : :2. On some fields, I need to track changes specifically to that field. For :instance, if someone changes the product price, I need to track the date of :the change, the product, and old price. I can think of a couple ways to do :this. When the field is changed in my form, then write appropriate :information to a separate table, perhaps tblproductchange : :date,productID,changeField,oldValue,NewValue :11/13, 101, price, $1, $2 :11/14, 101, name, widget, whatzit : :This should work for my needs, but I wanted to check with experts. I'm sure :some of you have had similiar needs and identified more efficient solutions. : :Many thanks! :David :
|
Sat, 07 Jul 2001 03:00:00 GMT |
|
|
|