ABCRobstown Posted August 11, 2006 Posted August 11, 2006 I have the following script: Enter Find Mode [] Go to Field [“Today’s Date”] Paste Current Date [“Today’s Date] Perform Find[] If [“Status(CurrentRecordNumber)=0] Perform Script [sub-scripts, “Import Names”] End If All works well EXCEPT if there are no records I get the nasty message after Perform Find “No records match this request.” I have to click “Continue” then the rest of the script is completed. Is there a way to do away with this message box and complete the script? Novices will be using this and I don’t want to confuse them.
RodSierra Posted August 11, 2006 Posted August 11, 2006 After you enter find mode use the set errror capture step (set error capture on), this will shut off the dialogue and its up to you to script for any errors...( the error code for no records found is 401), but you can still use the found count you are using now. Rod
Ender Posted August 11, 2006 Posted August 11, 2006 Should be: Enter Find Mode [] Set Field [“Today’s Date", "status(currentdate)"] Set Error Capture [ On ] Perform Find[] If [“Status(CurrentError) = 401] //No records found. Perform Script [sub-scripts, “Import Names”] End If
LaRetta Posted August 12, 2006 Posted August 12, 2006 Listen to Mike. But ... If [“Status(CurrentRecordNumber)=0] You were looking for Status ( CurrentFoundCount ) And I use testing for no records quite frequently over error capture here; it's whichever you prefer. To test for no records, it would be: If [ not Status ( CurrentFoundCount ) ] ... do whatever if no records ... and so on. LaRetta
Recommended Posts
This topic is 6680 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