4 Replies Latest reply on Apr 25, 2016 6:23 AM by Ben_B94

    Pause for User Input


      Couple of questions regarding the script step pause script,


      When you use the pause script step, is there a way to make the little bar that has continue script appear in the middle of the screen and not in the top right of Filemaker Pro or a way to make it stand out?


      I have steps, go to layout, add new record then pause to allow user to enter info.

      So is there a way I can use the users decision of 'cancel', to delete the newly created record?



        • 1. Re: Pause for User Input

          Don't pause. Split your script into two pieces. There are several reasons for it:


          1) Pausing is a security risk. An attacker can use an external file to force a Halt Script into your solution and break your logic (even if you disallow user abort).


          2) Your workflow can be unpredictable. If the user decides he wants to avoid continuing, he can simply hit "Cancel" (or force-quit the application). You can't stop the user from gumming up the works if he wants to.


          3) You have a lot more options - like your need to add a "Cancel" option - if you just finish the current script and then kick off a new one after choices are made.


          As to your specific use case, one way to avoid the "I added a new record and now I have to delete it" conundrum is to use a set of global fields for user input instead of creating a new record, If the user clicks "Save", then move the data in the globals to a real record. If he hits "Cancel", just clear out the globals and you're done.




          • 2. Re: Pause for User Input

            Thanks for the pointers Mike, i'll give it a go using global fields on another layout, I've never actually used them before in FM.

            • 3. Re: Pause for User Input

              Popover is good too (rather than a separate layout).

              • 4. Re: Pause for User Input

                Mike, went with the popover so no switching back and forth, works great, thanks again!