September 4, 200322 yr 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
September 4, 200322 yr 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.
September 4, 200322 yr 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.
Create an account or sign in to comment