Options for handling the current script when starting new scripts
Normally, only one script can run at a time, and additional calls to run scripts are queued until the running script is completed. However, the following ways of starting a new script can affect the currently running script:
-
The user clicks a button that is defined to run a script. You can choose one of the options to pause, resume, exit, or halt the running script as described in Defining or changing a button.
-
JavaScript in a web viewer calls a FileMaker script using the FileMaker.PerformScriptWithOption() function. See Scripting with JavaScript in web viewers.
-
An fmp URL specifies a script to run. See Opening FileMaker Pro files using a URL.
-
The Perform Script On Server with Callback script step specifies a callback script to run on the client.
The following actions describe how the currently running FileMaker script can be handled when a script is called. For Perform Script On Server with Callback script step, the action is controlled by the script step's State option. In the FileMaker.PerformScriptWithOption() function and in fmp URLs, the action is controlled by the option
parameter's string value. For all actions except Suspend and Resume
, the call to run the specified script is queued and may not start immediately.
Action |
|
Description |
---|---|---|
Continue |
|
After a currently running FileMaker script has completed, queued FileMaker scripts are run in order. If FileMaker script execution is canceled, the queue is cleared. (This is the behavior if |
Halt | 1
|
Execution of a currently running FileMaker script is halted, and all other pending scripts (queued or in the call stack) are canceled. Then |
Exit | 2
|
A currently paused FileMaker script is exited. If the current FileMaker script was called by another FileMaker script, control returns to the calling FileMaker script until no more scripts remain in the call stack. Then |
Resume | 3
|
A paused FileMaker script is resumed. After the resumed script is completed, |
Pause | 4
|
A paused FileMaker script remains paused. If the paused script is resumed and completed, then |
Suspend and Resume | 5
|
A currently running FileMaker script is suspended and Important Use the Suspend and Resume option with caution. Because This action isn't supported in the Perform Script On Server with Callback script step. |