OnWindowTransaction
(OWT) is a file-level script cause introduced in FileMaker 20.1. It turns on every time a transaction is dedicated in a record, offering beneficial features which include creating basic log files and triggering workflow notifications. This trigger is specially useful for troubleshooting records troubles and may be without problems included into current answers.
To permit OWT, go to the File Options dialog, wherein you may set off it like other document-level script triggers. Here, you’ll designate a script to run each time a transaction is devoted—this will be your “Processor” script. Additionally, you need to specify a discipline call, which ought to be introduced to every desk to your answer. The contents of this discipline can be surpassed to the Processor script as a parameter, and I’ll discuss with this discipline as the “Payload.”
With this enabled, any time records are created, modified, or deleted, the Payload data from those transactions will be sent to the Processor script, which can do whatever it wants to with that information, like writing it out to a log file.
About the Payload
The Payload area must be an unstored calculation with the setting “compare usually.” (For further information on how stored and unstored calculations fluctuate on this context, seek advice from my colleague Wim Decorte’s publish.) It is normally defined as a JSON item that consists of applicable information and metadata about the file. Avoid which includes precis fields or unstored calculations inside the JSON, as this could considerably impact overall performance.
For example, in the demo record, the Payload field named “z_wt_Contents” from the Event desk is an example of ways this have to be set up.
And here’s the identically named field from the Registrants table: