We would like to create a log to keep track of all timestamps and account names who have modified any record in any field of our database.
This is the kind of problem it would be good to be able to create your own interface objects (like text fields) that are sub-classes of the more general default ones. Then, you could add some code to each "control" (to log whatever), and then pass the behavior for that control to the default.
Visual FoxPro, as one database product, now gone, could do that interface object oriented sub-classing easily.
Sorry I couldn't be more helpful.
A client wanted for their own tracking on individual records, so I used a field trigger (enter/exit parameters) to store, compare, and if changed, record field, before/after change, and of course by whom and when, in a log on the record. The log field is kept to no more than 50 values (lines). It is put on just the fields they want to track changes on.
clear $$before at end of exit.
Thank you for helping me procrastinate!Lesson learned; NEVER set your web home page to "community thread"!
You might be able to concoct something with the OnRecordLoad and OnRecordCommit layout triggers. Capture RecordID and TableName and LastModUser, LastModAccount and LastModTimestamp into $$LoadVar on Record Load and then repeat for $$ExitVar on RecordCommit. If they differed you could write the results into a log table.
Not that I have done that but that would be my first attempt. Probably not the last.
Of course there is always NightWing Enterprises - UltraLog v2.x Audit Logging System for FileMaker The benefit of that is that it works already. It does cost money and needs FMPAdvanced.
When implementing something like this, be aware of any process that modifies records in the background.
I inherited a quote system that allows quote items to be re-ordered. The process works by changing the "sort" field in EVERY item of the quote. So the user may have only moved one item, but EVERY item has been modified.
Retrieving data ...