August 11, 200619 yr 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.
August 11, 200619 yr 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
August 11, 200619 yr 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
August 12, 200619 yr 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
Create an account or sign in to comment