From Dwayne Wright - www.dwaynewright.com
Typically, this script step is used to stop the currently running script. Normally, this script step will follow shortly after an IF or Else If script step. So this portion of the script is looking for something in particular about the FileMaker record at that moment in time and then deciding to forgo executing the remainder of the script.
If this script was called upon a previous script, that script will continue to run. This is different than the Halt script step which will have ScriptMaker stop running all together before reaching the scripts end.
Recently, the Exit script step had a new option added to it called the Script Result. When you select this option, you are greeted with the calculation dialog box. The value (text, field reference or calculation) that you place into this calculation dialog will be used when the script step is executed to return that value into memory. Then it can be used later via the Get(ScriptResult) function.
HOW IT IS USED
Once again, the Exit Script step is usually used after a script branching action by the IF script step. The most common is after the Show Message script step. That step presents the user with up to three choices in the Show Message dialog box. Many times one of those options will be a Cancel button. Cancel would normally take the user out of the script via the Exit Script step.
Be sure that in using the Exit Script step, you do not strand the user on an unfamiliar layout or leave them in the wrong layout mode. Always make sure the user is on the layout and in the mode (Browse or Find usually) they should be in before you Exit a script.
Got To Know Factor - 6
More info about the author and FileMaker in general, contact me at email@example.com.
© 2007 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.