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.

Audit Trail using AutoEnter Calc

Featured Replies

Hello all,

I am trying to create a log of changes to a field using John Osbournes technique from his sample file "Change Log". It tracks who, when, what field, and what data was changed into a log field. I have no problems creating the log when the data entry is done in the same file (not through a file reference) as the data. But when I do data entry to the exact same Table Occurrence through a file reference, the changes are not logged. Anyone have an inkling why? or what to do about it?

Below I have attached the code, which is set to auto enter with the do not replace existing value unchecked, for the log field (it is in the same table as the field modification it is logging)

Case(PatternCount("Textfield"; Get(ActiveFieldName));"- " &

GetAsText(Get(CurrentDate)) & " | " &

GetAsText(Get(CurrentTime)) & " | " &

Get(AccountName) & " | " &

Get(ActiveFieldName) & " = " &

Case(Get(ActiveFieldName) = "Textfield"; Textfield; ) &

Case(not IsEmpty(Log); "

Hello Eric,

Yes, I can tell you why.

The Get ( ActiveFieldName ) function in Filemaker 7 operates only within the domain of the current file - it will not return the name of a field in another file that the cursor may be in. This arises from the different way in which FileMaker 7 handles windowing and window states. As a consequence, if the cursor is in a field which is on a layout in an interface file and the log calc is being evaluated in a separate data file, the calc will return a null response for the Get ( ActiveFieldName ) function.

The solution is to define an unstored calc in the file where the edits are to take place (eg in the interface file) with the formula specified as Get ( ActiveFieldName ), then reference this field via a relationship from the data file, including it in your log calc in place of the Get ( ActiveFieldName ) function. That will get your logs on track. wink.gif

  • Author

You Rock Ray!

I used the technique you explained and it works very nice so far. (have yet to test every angle). I don't know if there is a better way to set up the relationship, but I used the cartesian "x" to relate the Get (ActiveFieldName) calculation in the interface file to the primary ID in the table where the data file is. (I guess it doesn't matter what fields you use for relationships with the "x")

Thanks again,

Melbourne huh... lucky you, can check out some Aussie Rules at the MCG. cheers.gif

Create an account or sign in to comment

Important Information

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

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.