Rimbuk Posted September 28, 2000 Posted September 28, 2000 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?
Chuck Posted September 29, 2000 Posted September 29, 2000 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
LiveOak Posted September 29, 2000 Posted September 29, 2000 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
Rimbuk Posted October 2, 2000 Author Posted October 2, 2000 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.
Chuck Posted October 2, 2000 Posted October 2, 2000 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
Recommended Posts
This topic is 8822 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now