Reference > Script triggers reference > OnViewChange
 
OnViewChange
Performs a script after you switch views (Form, List, Table) manually or in a script step.
When the script runs
After the event has been processed.
Modes in which the trigger can be used
Browse, Find, and Preview modes.
Result
None.
Compatibility 
 
Where the script trigger is activated 
Supported 
FileMaker Pro 
Yes 
FileMaker Server 
Yes 
FileMaker Go 
Yes 
Custom Web Publishing 
Yes 
FileMaker WebDirect 
Yes 
Runtime solution 
Yes 
Originated in 
FileMaker Pro 11.0
Notes 
This script trigger will not activate when a window is opened, unless another action after the window is opened causes the view to change.
Related topics 
Setting up script triggers
Setting script triggers for layouts
Setting script triggers for objects