Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted (edited)

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
Posted

thanks for that Vaughn. I tried something like that earlier and it didn't work. However, thanks to you I realised I was not using the set field step directly after the import step.

Cheers. That has saved me no end of headaches!!!

This topic is 6928 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.