mjay Posted July 16, 2003 Posted July 16, 2003 Hello, I have a record that has fields A - F. I want a calculated field that says "Record Updated 1/1/2003 by User1". I want the field to change when information in fields A, B, C change but not if info in fields D, E, F change. Creating the screen is not a problem, the issue is updating if only certain fields change. Thanks for any help
-Queue- Posted July 16, 2003 Posted July 16, 2003 I don't think this can be accomplished with a mere calc field. You can, however, script A, B, and C fields with buttons that set the original info into a global field, pause, and test the difference between the global and current field's contents once the user clicks Continue or presses Enter, setting a 'Record Updated' field with the date and username, if the contents have been modified. I'm using this type of function for a Dun & Bradstreet credit rating that I want to show was modified by a particular user on a particular date, regardless of the auto-entered Modification Date and Modifier Name fields when the remainder of the record changes. Will this work for your needs?
djgogi Posted July 16, 2003 Posted July 16, 2003 You just need to use "monitored" fieldz like this: Case(a & b & c, "Record modified on " & DateToText(Status(CurrentDate) ) & " by " & Status(CurrentUserName), "Record modified on " & DateToText(Status(CurrentDate) ) & " by " & Status(CurrentUserName)) Of course this calculation have to be indexed (iow fields a, b , c have to be indexable) otherwise the calc will update on every screen refresh. Dj
kennedy Posted July 16, 2003 Posted July 16, 2003 There are clever ways to use lookup calculations that are "triggers" that fire on whatever set of fields you want them to fire on. I use the technique to allow me to record an audit trail on whichever fields I want to log. To see that as an example, pick up The Works Template and take a look at the fields with "LOG" in the name and LogTrigger in both the Families and Persons files. Or pick up the ModLog tip referenced in the Credits of that same thread.
Recommended Posts
This topic is 7800 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