Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8822 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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. smile.gif

Chuck

Posted

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

Posted

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.

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.