nolimitsit Posted September 4, 2003 Posted September 4, 2003 Dear All, I am trying to execute a script that is used to remove redudant data. I perform a search for duplicates and then execute the script to remove the appropriate duplicate. The problem is that if the search returns an empty set, the script is executed anyway. How can I stop it from running if their are no duplicates? Thanks Dave Collins No Limits IT Inaburra School
-Queue- Posted September 4, 2003 Posted September 4, 2003 Assuming Set Error Capture [On] has been called in your script already, add an If [status(CurrentFoundCount)] steps to remove dupes End If If no records are found, it won't execute what's between the If statement.
CobaltSky Posted September 4, 2003 Posted September 4, 2003 Hello Dave and Queue, The method Queue has suggested is a valid 'alternative' method and may well be suitable. For the sake of interest, the 'conventional' method would be to start the script with the Set Error Capture [On] command and then to include the steps: If ["Status(CurrentError) = 401"] Exit Script End If - which would come immediately after the 'Perform Find' step. The conventional approach is not inherently better - unless you have additional error conditions to test for within the same script, in which case it would make sense to use the inbuilt error code system.
Recommended Posts
This topic is 8098 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