OnPanelSwitch

Performs a script when a panel control changes panels. This can happen in a tab control, for example, when a user clicks an inactive tab panel or when a script changes the focus to an object on a different tab panel.

When the script runs 

Before the event has been processed.

Modes in which the trigger can be used 

Browse and Find modes.

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 Yes
FileMaker Go Yes
FileMaker WebDirect Yes
FileMaker Server Yes
FileMaker Cloud Yes
FileMaker Data API Yes
Custom Web Publishing Yes

Originated in version 

12.0

Notes 

  • OnPanelSwitch applies to the entire panel control and not to individual panels. To control switching to particular panels, use the Get(TriggerCurrentPanel) and Get(TriggerTargetPanel) functions.

  • Because this script trigger is activated before the panel switch event is processed, the value of the script parameter that OnPanelSwitch passes to your script is determined before the panel is switched. Therefore, if you use the script parameter to pass the returned value of Get(TriggerCurrentPanel) or Get(TriggerTargetPanel) into your script, the value will be zero. To get useful returned values, use these functions only within the script activated by OnPanelSwitch, not in the script parameter.