Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Window.SetCloseTrigger
Sets close trigger.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Window | 12.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
MBS( "Window.SetCloseTrigger"; Ref; Filename; ScriptName ) More
Parameters
Parameter | Description | Example |
---|---|---|
Ref | Pass window or web viewer reference number. | |
Filename | The database file name where the script is located. | "test.fmp12" |
ScriptName | The script name. | "MyScript" |
Result
Returns OK or error.
Description
Sets close trigger.Informs you if a window with a reference closed or a custom web viewer was removed from the layout. FileMaker may rebuild the current layout and delete the custom web viewer.
Parameter to the script is the reference number passed here to identify the object. Please be aware that Window objects are gone when the trigger runs.
Examples
Create web viewer and set close trigger:
Set Variable [ $$web ; Value: MBS("WebView.CreateWithControl"; 0; "placeholder"; 1) ]
Set Variable [ $r ; Value: MBS("Window.SetCloseTrigger"; $$web; Get(FileName); "Closed") ]
See also
Release notes
- Version 12.5
- Changed custom WebViewer to put it back if FileMaker rebuilds the layout. No longer need Window.SetCloseTrigger to trigger a script to do this.
- Version 12.1
- Added Window.ClearCloseTrigger and Window.SetCloseTrigger function.
Blog Entries
- MBS FileMaker Plugin, version 12.5pr2
- New in MBS FileMaker Plugin 12.1
- MBS FileMaker Plugin, version 12.1pr1
This function is free to use.
Created 20th January 2022, last changed 20th January 2022