Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
11.4
11.5
12.0
12.1
12.2
12.3
12.4
12.5
13.0
13.1
Statistic
FMM
Blog
Audit.Changed2
Same as Audit.Changed, but here you pass the list of fields to check.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Audit | 3.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
timestamp | Pass here the timestamp field you added for auditing to the table. | AuditTimeStamp |
TableName | The name of the table. Or the table occurrence if needed. With 10.2 optionally as second value the name of the audit log table unless you take the default AuditLog. |
"Firma¶MyAuditLog" |
FieldsToCheck | A list of field names to check. | "myField" |
Result
Returns 1.
Description
Same as Audit.Changed, but here you pass the list of fields to check.The Audit.Changed2 function with passing field list is quicker than the Audit.Changed function as we skip querying the field list from FileMaker.
Examples
Log record on changes:
MBS( "Audit.Changed2"; MyTable::AuditTimeStamp; "MyTable"; "firstName"; "lastName"; "age" )
Run Audit.Changed2 with list of fields in a global field in the table:
Evaluate("MBS(\"Audit.Changed2\"; GetAsTimeStamp(\"" & Events::AuditTimeStamp & "\"); \"Events\"; \"" & Substitute(Events::AuditFields; "¶"; "\"; \"") & "\")")
Run Audit with GetFieldName with v8.3 or newer:
MBS("Audit.Changed2"; // call with positive list
AuditTimeStamp; // the timestamp field to trigger this
"Audit"; // the name of table
GetFieldName ( SomeText); // the fields to check
GetFieldName ( SomeNumber);
GetFieldName ( SomeTime);
GetFieldName ( SomeTimeStamp);
GetFieldName ( SomeContainer);
"InsideScript|" & $$InsideScript) // and we pass an extra field with global variable
Do Audit and set custom TransactionUUID field with UUID:
MBS( "Audit.Changed2"; MyTable::AuditTimeStamp; "MyTable"; "firstName"; "lastName"; "age"; "TransactionUUID|" & Get(UUID) )
See also
Release notes
- Version 10.4
- Fixed a crash in Audit functions when querying GetFieldID internally. Affects Audit.Backup, Audit.Backup2, Audit.Changed, Audit.Changed2, Audit.Delete and Audit.Delete2 functions.
- Version 10.2
- For Audit.Changed and Audit.Changed2 you can now customize AuditLog table name. The table name parameter can be a list and include first the table name for the table to check and second the name of the audit table name. If second is empty, we default to AuditLog.
Example Databases
Blog Entries
- Perform Script on Server with Audit for FileMaker Go
- MBS FileMaker Plugin, version 10.4pr1
- MBS FileMaker Plugin, version 10.2pr2
- Audit with MBS FileMaker Plugin
FileMaker Magazin
This function checks for a paid license.
Created 18th August 2014, last changed 16th February 2023
