Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Field history

Featured Replies

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 by Guest

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.

  • Author

Thanks for your answer, but "committing the record" in the script doesn't work either.

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.

  • 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.

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

  • Author

Thanks very much for your 2 solutions.

I like the first one and will use it !

  • 2 months later...

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

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.