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

Blog Entries

This function is free to use.

Created 20th January 2022, last changed 20th January 2022


Window.SetCloseButton - Window.SetCurrentTag