Jump to content

does cancelling an import generate an error?


This topic is 6709 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a script in a solution that first exports data from a table and then carries out various other script steps. My problem is that when a user presses the cancel button on the export script it continues on running the rest of the script. I want all the other script steps to only be activated if the import command is carried out. (Oh and the export step needs to be have dialogue turned on.) Cancelling an export script step does not seem to generate an error message.

I have the same problem with an import script step. In this instance, if the user cancels the script step OR they try to import the wrong type of file.

ANy help would be appreciated

Link to comment
Share on other sites

Yes: Error 1 = user cancelled action.

Try this in your script:

Allow User Abort [on]

Set Error Capture [on]

Export []

Set Field [gError = Status) CurrentError )]

Allow User Abort [off]

Set Error Capture [off]

If( gError = 0 )

# Export completed

Else

#Export cancelled or failed

End If

Edited by Guest
Link to comment
Share on other sites

This topic is 6709 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.