Setting up script triggers
You can set up a script trigger to specify that a script runs when an event occurs. For example, you can use a script trigger to run a script that automatically enters data in fields based on what is entered in another field.
Some script triggers run the script before an event is processed by the database engine. Other script triggers run the script after an event is processed by the database engine. For example, you could use the OnObjectEnter script trigger to run a script after a field is entered. (The field is the object; entering the field is the event.)
Script triggers can be activated by user actions or by scripts. For example, you could use the OnObjectEnter script trigger to activate a script to run when a field is entered either by a user clicking it or by a Go to Object script step.
You can set up a script trigger to activate:
 •
 •
 •
To see which layout objects and layouts have script triggers assigned to them, in Layout mode, choose View menu > Show > Script Triggers.
The following script triggers are available:
 
Timing of script triggers
When multiple script triggers are activated by the same event, the script triggers execute in the following relative order:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
Notes
 •
 •
 •
 •
 •
 •
Related topics 
Debugging scripts (FileMaker Pro Advanced)
Using the Data Viewer (FileMaker Pro Advanced)
Topics in this section
Setting script triggers for layouts
Setting script triggers for objects
Changing object data without activating script triggers