September 28, 200025 yr I need to make a history field in our bug database. Right now, it keep a history of 'comments' by putting the date, time, and comment at the bottom of the field. What I want to do is add what fields have been changed in the record. For instance, I'd like it to say something like: 9/28/00 7:56AM Fields changed: status owner description Is there a way to do this with a script? When you submit something, it has to know what fields have changed and what has stayed the same, how do you get that information?
September 29, 200025 yr quote: Originally posted by LiveOak: It's possible, but requires a little work. 1) The user clicks an "Edit" button. A script makes a copy of all the "real" fields in the record to a set of global fields. The global fields (via a layout change) are displayed to the user for editing. 2) The user makes the changes desired and then clicks "change", "accept", "ok" or whatever button label signal acceptance of the changes. 3) A script compares the global fields to the original fields, logs the fields that have changed, and then updates the "real" fields from the global fields. -bd It's also possible to do this without the globals and without any scripting. It's a complicated process involving lookups and calc fields. The technique is documented with the file at http://www.clickware.com/downloads/tips/modfields.hqx for Mac or http://www.clickware.com/downloads/tips/modfields.zip for Windows. The way I think it works is that the order of the field creation makes it so that a lookup happens after a calculation is done, so that you can compare the two, and if they differ, use another calculation to set the log to have an entry for the action. One thing I do remember is that the order of the creation of fields is important. You need to create the fields in a particular order or else it won't work. Take a look at the files. They will help. It isn't the best version of this, but it's the one I found quickly. Chuck
September 29, 200025 yr It's possible, but requires a little work. 1) The user clicks an "Edit" button. A script makes a copy of all the "real" fields in the record to a set of global fields. The global fields (via a layout change) are displayed to the user for editing. 2) The user makes the changes desired and then clicks "change", "accept", "ok" or whatever button label signal acceptance of the changes. 3) A script compares the global fields to the original fields, logs the fields that have changed, and then updates the "real" fields from the global fields. -bd
October 2, 200025 yr Author Chuck: Thank, but sadly your solution doesn't seem like it will work through a web browser. I'll have to try the above instead.
October 2, 200025 yr quote: Originally posted by Rimbuk: Chuck: Thank, but sadly your solution doesn't seem like it will work through a web browser. I'll have to try the above instead. Actually, I think they would work through a web browser. You may want to try it with a field or two and see. Chuck
Create an account or sign in to comment