January 4, 201114 yr What is the best way to prevent user interaction with FMP while a script runs? Predictably my users don't pay any attention to any sort of prompts or warning messages that I plaster about their screens when a particular script is running in the background and this results in the script exiting abnormally and them having to force quit and restart FMP. Even after being told multiple times not to touch anything while the script runs I still run into this problem daily. So, what is the best way to prevent someone from doing ANYTHING in Filemaker until a script has been completed?
January 4, 201114 yr First of all, make sure that no buttons on your layouts are set to Halt the current script. Second, you might want to take a look at the Allow User Abort script step. This will disable the usual method of breaking a script early using Ctrl-. or Esc. It will also prevent them from closing the window of the current active script. Be careful, however, since it completely disables the user's ability to abort, even if the script is going haywire.
January 4, 201114 yr Quartekoen's advice is right on. I would add a few other things... 1 - If you have FileMaker Advanced you can test the script first before turning off the Abort feature... Just to make certain it runs correctly... 2 - If the script is running some long procedure - looping through records - creating records, etc. - you should see if there is a way to "update" the status - or at least see if you can figure out how long the script should run and maybe display the start time and expected end time...
January 4, 201114 yr First of all, make sure that no buttons on your layouts are set to Halt the current script. Second, you might want to take a look at the Allow User Abort script step. This will disable the usual method of breaking a script early using Ctrl-. or Esc. It will also prevent them from closing the window of the current active script. Be careful, however, since it completely disables the user's ability to abort, even if the script is going haywire. You can give yourself an escape if you want. For instance, you can have an if statement that looks for get(currentmodifierKeys) shift and option, and then gives the user a prompt to escape the loop. But you may not want to let users know about tjhsi feature.
Create an account or sign in to comment