July 23, 200718 yr Hello, I wish to make a field history i.e. a log entry each time I modify a field. To do that I added 2 excellent custom functions by NightWing Enterprises (SuperLog and ScriptLog) to my solution: http://www.nightwing.com.au/FileMaker/demos8/demo809.html It is exactly what I need and works quite well. The only problem is that to make a log entry after the field was modified, the user has to go MANUALLY to the next field. See example1.fp7 If the field is modified and then the user clicks on the "history" button without going first to the next field, no log entry is done. (Adding "going to next field" function or similar to the "Open Field History" script doesn't work). I solved this problem by using the second custom function (ScriptLog) which permits to trigger a log entry from a script. See example2.fp7 The problem that I have left, is that now, each time I click on "history" there is a log entry even if I didn't modify the field... How can I modify the custom function so that it makes a log entry only if the field was modified ? Thanks in advance for your help. examples.zip Edited July 24, 200718 yr by Guest
July 23, 200718 yr The only problem is that to make a log entry after the field was modified, the user has to go MANUALLY to the next field. I believe you are mistaken about that. To make a log entry, the user must commit the record. If you click the "history" button without committing the record first, you see no entry in the log - because the record was NOT yet modified.
July 23, 200718 yr Author Thanks for your answer, but "committing the record" in the script doesn't work either.
July 24, 200718 yr True, but that's another matter: the custom function you are using is purposefully designed not to modify the log when a script is running.
July 24, 200718 yr Author The "ScriptLog" function can be used from a script. See example2 file. The only problem is that it makes an entry each time I press the "history" button. I wish to modify the custom function so that it makes a log entry only if the field was modified.
July 24, 200718 yr I wouldn't mess with Ray's functions. Here are two alternatives you could try, but I haven't tested them thoroughly, esp. the second one, so proceed at your own risk. The best way, I think, would be not to have that button on the layout (or any other means for the user to get out of modifying data other than by committing the record properly). Or employ a simpler audit log method. example3.fp7.zip
July 24, 200718 yr Author Thanks very much for your 2 solutions. I like the first one and will use it !
October 5, 200718 yr Hello, I am trying to get the Super Log System to work. Looked at your example file and the original, and they both work; mine doesn't. I get one line of the change, not the history and also, there's a second line with junk in it. Example: 10/5/2007 1:01:37 PM Admin Articles [---] -» werererrererkjbjkn werererrererkjbjkn I copied both custom functions from the original file and they seem to match line by line. There is a line in teh custom function "Get (ScriptName)"; I don't know what that refers to since we're not using a script here, right? Do you have any idea what's going on? Thanks, Ago
Create an account or sign in to comment