Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
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 |
Parameter | Description | Example | Flags |
---|---|---|---|
timestamp | Pass here the timestamp field you added for auditing to the table. This field is passed here to trigger the calculation, but the value is not used. Must be a timestamp. |
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" | |
ExtraFields... | Custom fields to set. Pass in field name followed by "|" character and a value. Field type can be text or number. |
"ScriptName|" & $ScriptName | Optional |
Returns 1.
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) )
This function checks for a license.
Created 18th August 2014, last changed 12nd May 2023