July 16, 200322 yr 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
July 16, 200322 yr 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?
July 16, 200322 yr 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
July 16, 200322 yr 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.
Create an account or sign in to comment