- it's so good you can take a 'nap' -
FileMaker Pro NOW has a native, plug-in free way to audit changes to your database. This is a Technology Preview of NeoCode-Audit-Pro tool. It logs inserts, updates, and deletes to a separate FileMaker file without use of plug-ins. It is developed and tested on FileMaker Pro 15-- older versions are not supported.
FILES
- Task_Audit.fmp12 - Sample FileMaker Starter Solution that has had NeoCode-Audit-Pro integrated.
- NAP_Service.fmp12 - The Audit engine that pulls the logged event data out of Task_Audit.fmp12 and stores the events.
What the files will and will not do...
- Logs 'Audit Events' when users Insert, Update and Delete
- Audit Events are logged to memory; NAP_Service then intermittently commits events to disk.
- Supports cascading delete & related record creation.
- Supports record revert.
- Task_Audit.fmp12 events are logged in memory.
- NAP_Service.fmp12 manages garbage collection while committing events to disk.
- Uses ExecuteSQL() to dynamically capture database schema; changes to database design are captured.
- Minimal integration steps (to be documented).
Known bugs, incomplete and unsupported features. This is essentially our to-do list. Not in any particular order.
- No implementation documentation.
- Does not support shared deployment (single user).
- Does not support FileMaker Go, FileMaker WebDirect (untested).
- Does not support server side data events (audits user events only).
- No error handling.
- Does not support multiple windows (untested).
- Does not log insert/update events triggered by importing data.
- Does not log container data-- yet.
- Does not support repeating fields.
- Does not support commas in data.
- Does not log table name.
- No implementation of rollback. (Does not support audit recovery)
Excerpt of the custom function that logs audit events into global variables.
Let ([
...
//#### JSON ####//
~json_sql_data =_Aud_Get_AuditEvent (~QFN ; ~TblNum )
];
Case (
//##### NO DATA #####//
IsEmpty ( ~json_sql_data ) ;
"" ;
//##### DELETE TYPE #####//
~Action = "DELETE" ;
_Aud_Set_AuditEvent ( ~json_sql_data ; ~Action ) ;
//##### INSERT #####//
~Action = "INSERT" ;
_Aud_Set_AuditEvent ( ~json_sql_data ; ~Action ) ;
//##### UPDATE #####//
~Action = "UPDATE" ;
_Aud_Set_AuditEvent ( ~json_sql_data ; ~Action ) ;
//##### DEFAULT #####//
""
)
) //END Let
FileMaker Pro 15
Tasks_Audit.fmp12 (this would be replaced by your file)
NAP_Service.fmp12 (this is where your audit events are stored)
Opens automatically with the following credentials-- record changes CANNOT be logged using Admin (Full Access) account.
- user: "NAPUser"
- pass: ""
- user: "Admin"
- pass: ""
- Open Tasks_Audit.fmp12
- Insert|Update|Delete records
- From file menu, select "Window > Show Windows > NeoCode Audit Pro - Service"
- Click the button "Show Audit Log"
- Review that your record changes have been logged.
Andrew Duncan (DataBuzz) http://www.databuzz.com.au/using-executesql-to-query-the-virtual-schemasystem-tables/
- Paul Nelson
- Joshua Paul
MIT
- Logs 'Audit Events' when users Insert, Update and Delete.
- Logs cascading delete & related record creation.
- Logs checksum.
- Supports record revert.
- Task_Audit.fmp12 events are logged in memory.
- NAP_Service.fmp12 manages garbage collection while committing events to disk.
- Uses ExecuteSQL() to dynamically capture database schema; changes to database design are captured.
- Minimal integration steps (to be documented).
- Create harness to test load & verify audit results.
- Test iOS deployment.
- Escape commas in csv data.
- Log field repetitions.
- Log Audit Event table name.
- Document basic implementation steps.
- Add Audit Event Group Id.
- Rollback/Recover a single record.
- Test N.A.P. hosted on FileMaker Server.
- Fix issues.
- Add complete error capture.
- Create detailed implementation documentation.
- Log inserts for imported records.
- Recover multiple records.
- Fix issues.
- Optimize data scrape (use evaluate instead of ExecuteSQL?).
- Add ability to limit set cache size; how many events before it's 'forced' to backup.
- Log Audit Event as JSON/XML.
- Post Audit Events to Web Application.
- FMGo sync