1 Reply Latest reply on Jun 29, 2015 9:39 AM by philmodjunk

    Stopping a script

    fmpro_novice

      Title

      Stopping a script

      Post

      I have a simple Find script:

      Enter Find Mode [Restore]

      Go to Field [MAIN::Name]

      Pause/Resume Script [Indefinitely]

      Perform Find []

      Go to Field [MAIN::Street]

      Everything works perfectly with this, unless the user decides to just abort the Find. It doesn't look like there is a problem with that, except the Paused Script is still Paused. How can I Halt the Script if the user just decides to click out of the Find box?

       

        • 1. Re: Stopping a script
          philmodjunk

          Just clicking out of the find box also leaves the user in Find Mode, not browse mode.

          I've never been a big fan of using a script for finds that just enters find mode and pauses.

          I prefer to set up a group of global fields where the user specifies find criteria while still in Browse mode. A script then enters find mode and uses the data in the global fields to construct find requests and perform the find.

          In that scenario, canceling the find is simply a matter of either closing a popover, closing a modal window, or clicking a cancel button that does the same thing.

          For examples of scripts that use global fields in this fashion, see: Scripted Find Examples