Script triggers
* * Script triggers are always bound to user layout interfaces. For data tables or fields. Only the interface can be triggered.
* * If a layout or object contains a trigger, there will be a trigger icon in the lower-right corner
* * When an event is triggered, there is only one trigger that will be executed.
Layout-level triggers
**onrecordload: Trigger after loading record
**onrecordcommit: Sent before the record is changed
The actions that will be submitted are: Toggle layout or Record press ENTER
**onrecordrevert: Triggered before a record restore
**onlayoutkeystroke: Triggered when a keystroke is accepted in the layout
When the user presses the button, the operating system snaps first, then the Filemakerpro, then the Onobjectkeytroke, and finally the Onlayoutkeystroke.
**onlayoutenter: Trigger script after user enters layout
A practical use of onlayoutenter is to perform certain actions when a user enters a layout
**onlayoutexit: Trigger script after exiting layout
**onmodeenter: triggered after entering browse \ query \ Preview mode
**onmodeexit: triggered after exiting browse \ query \ Preview mode
**onviewchange: Trigger script when changing form, list, switch between views
**ontabswitch: Triggers Before changing the tab panel
If you want to trigger an action on a panel, you can combine get (Triggercurrenttabpanel) with Get (Triggertargettabpanel)
Object-level triggers
**onobjectenter-Triggers a script when the object is active or focused
**onobjecttroke-An action is triggered when an object is active and a keystroke is received
FILE-level triggers
* * Set method file--File option--Set trigger
* * for triggers prior to 11 events, Return:false can be used to block the run. After the event, you cannot use Return:false to block it.
**ontime Trigger
* * Activate scripts within a repeating time interval, install OnTime scripts using script steps
---if it is a layout or object-level validation, the script trigger will not be triggered if the data is a change made through other means, such as scripting.
This article is from "Angry Little Fai" blog, please be sure to keep this source http://cycle.blog.51cto.com/8569872/1677144
The foot book in FileMaker Learning Notebook