« MBS FileMaker Plugin … | Home | MBS Xojo Plugins, ver… »

Configure Audit functions in MBS Plugin

If you use Audit functions in MBS FileMaker Plugin, you can configure them with a couple of options, so let's check the options.

Date and time as numbers

For years we had the problem, that two people working on a database may have different locale. So one opens a records and saves it with "12.05.2022" as date (12th May). Then another user looks on the record and FileMaker formats it in different locale as 05/12/2022 and saves that. The Audit log would record that as a change and cause a lot of extra log entries.

To avoid this trouble, we added an option for 12.3 to store the time, date and timestamp values as numbers. Once turned on with Audit.SetDateAndTimeAsNumbers function, you see them stored numerical. Of course if you have old entries, those will now be logged again with their numeric value. So better start using this when you start with a fresh AuditLog.

Ignore Calculations

We always ignore unstored calculations, since there is no need to log them. But for stored calculations, you may decide to also not store them with calling Audit.SetIgnoreCalculations function. Pass 1 to disable the storing of calculated fields.

Repetitions

While repetitions are a powerful feature and often used for localization, they seem to be a relic of past times without relations. If you enable audit to watch for repetitions using Audit.SetIgnoreRepetitions function, we query how many repetitions a field has and then log all the values we find there.

Summary fields

Usually you may not want to log summary fields, so please call Audit.SetIgnoreSummaryFields with value 1. Otherwise pass 0 to have them logged. Since summary fields can be recalculated, we usually don't want to store them in the audit log.

Ignore fields with underscore in names

Some developers like to name internal fields with an underscore character at the start of the name. Call Audit.SetIgnoreUnderscoreFieldNames and pass 1 to ignore those fields.

Ignored Field Names

If you have a lot of tables with similar field names that you like to skip, please pass a list of field names to Audit.SetIgnoredFieldNames function.

Log Access

There is a chance that FileMaker calls our Audit.Changed function, the plugin checks all fields and finds no changes. Maybe some other field changed, which is excluded? Anyway, we can log this as an access to note that this user did something on the record. But a few users like to turn this off with passing zero to Audit.SetLogAccess function.

UUID Field

If your records use UUIDs as primary key, you can pass the field name to Audit.SetUUIDField and have the plugin use that value instead of the internal record ID to log the changes in AuditLog.


For all the options, please set them early in your start script. Technically you may change them later, but since we cache some things, the change may not take effect right away.
10 06 22 - 11:11