Reference > Script triggers reference > OnWindowClose
 

OnWindowClose

Performs a script each time you close a window of a database file.

When the script runs

Before a window is closed or before the OnLastWindowClose script trigger (if it is selected in the Script Triggers tab) is activated.

Modes in which the trigger can be used

OnWindowClose activates after FileMaker Pro Advanced exits a mode.

Result

You can use the Exit Script script step within the triggered script to return True or False.

True: The event that triggered the script proceeds.

False: The event that triggered the script is canceled.

Compatibility 

 

Product 

Supported 

FileMaker Pro Advanced 

Yes 

FileMaker Go 

Yes 

FileMaker WebDirect 

Yes 

FileMaker Server 

Yes 

FileMaker Cloud 

Yes 

FileMaker Data API 

Yes 

Custom Web Publishing 

Yes 

Runtime solution 

Yes 

Originated in

FileMaker Pro 12.0

Notes 

The script will run even if the file itself remains open, for example if it is referenced by another file with open windows. The closing script will be performed each time a window of the specified file is closed.

If the script executed by the OnWindowClose script trigger returns a False value, then the file will not close.

Related topics 

Setting up script triggers

Setting script triggers for layouts

Setting script triggers for objects