AnsweredAssumed Answered

Replace Field Contents Script: Trap User Stopped

Question asked by purefool on Feb 18, 2019
Latest reply on Feb 18, 2019 by Johan Hedman

I wrote a script that enables a user to tag the found set/remove the tag from same at the click of a toggle button.

 

 

Originally, I used the Loop and Set Field script steps to handle this operation, but found that this was rather slow.

 

 

I amended the script to use the Replace Field Contents step. This is much faster, but throws up another issue.

 

 

The data set is quite large, so the script still requires a few seconds to run. If the user clicks the 'Stop' button while it is underway, an FM message pops up asking the user if they wish to continue with the script.

 

 

I added the Set Error Capture On script step to trap this in a variable. It does so. However, the error returned is 0.

 

 

Is there a method to trap for an action that the user has stopped? I’d like to script a more user-friendly alert card.

 

 

I could set Allow User Abort Off, of course, but am always wary of adding this step in case another issue makes the solution hang, and, so, locks the user’s session.

 

 

Thanks in advance for any advice.

Outcomes