RWX Posted June 7, 2005 Posted June 7, 2005 I have a fully scripted Find Mode for my users. I'm trying to decide whether or not to allow user abort when triggering the find script. If I do, I want to capture the fact that the user canceled the find mid-way through and direct him or her somewhere...and right now I can't figure out how to make that work. Is it possible??? FYI, I've tried Error Caputre On and Get ( LastError ) = 1 (user cancelled action), but it didn't work. Thanks! -Rob
Ender Posted June 7, 2005 Posted June 7, 2005 The script will be cancelled if the user hits the cancel button on the status bar. Instead, don't allow user abort, but add a button to the layout for cancelling. This should have an Exit Script or Halt Script option on the button, and can then execute whatever script you wish for leaving the find process (Be sure to Enter Browse Mode[] within the script.)
RWX Posted June 7, 2005 Author Posted June 7, 2005 I've done this. However, I was hoping to capture the "Cancel" on a sort or find once it has been initiated. In other words, I create a script that includes a sort step. If the user clicks Cancel in the sorting records dialogue, I want to capture that action and continue the script. I guess this is not possible.
Ender Posted June 7, 2005 Posted June 7, 2005 Capturing the Cancel in a Sort dialog or other dialog is different from cancelling a Find. Cancelled dialogs will return a 1 for the get(lasterror) function. Just make sure you check for this error immediately after the script step you are checking.
RWX Posted June 8, 2005 Author Posted June 8, 2005 Interesting...I created a little test script and it worked when cancelling a sort. However, my find mode has several calculated (and non-indexable) fields on it. If these fields are searched and the user cancels the "Processing Query" dialogue, the script simply stops. It does not continue with the remaining steps, including the Get ( LastError ). Any thoughts???
-Queue- Posted June 8, 2005 Posted June 8, 2005 Do you have Set Error Capture set to On and Allow User Abort set to Off?
Recommended Posts
This topic is 7111 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now