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 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

option value

Description

Continue

0

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 option is not specified. This is also the default behavior for FileMaker.PerformScript().)

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 script is run.

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 script is run.

Resume 3

A paused FileMaker script is resumed. After the resumed script is completed, script is run.

Pause 4

A paused FileMaker script remains paused. If the paused script is resumed and completed, then script is run.

Suspend and Resume 5

A currently running FileMaker script is suspended and script is run. When script is completed, the suspended script resumes with the next script step. A paused script remains paused while script is run.

Important  Use the Suspend and Resume option with caution. Because script can change the current context (for example, go to a different layout, modify records, and change global variables), the suspended script could resume in a different context and produce unexpected results.

This action isn't supported in the Perform Script On Server with Callback script step.