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

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

Recommended Posts

Posted

Hi,

I have a button that executes a script that will bring up a dialogue box to enter a couple of search variables... then it performs the search, goes to preview mode, and prints out the report. Yeah!

The problem is that what if the search yields no results? Then it continues the script going to preview mode where nothing is displayed and unfortunately the user thinks there is something wrong and they want to close it down.

How do I script for errors so if the search yields no results, then i could put up another dialogue box...?

Thanks

Vandy

Posted

Hi Vandy,

here is something I have been using and has been working great (so far)

...a bunch of steps to perform the find

if(Status(CurrentFoundCount)<0)

show message "no records meet your request"

---a bunch of steps like perform another script of exit or...whatever

else

---do what you do now

EndIf

Posted

"Status" is for previous versions. Use Get(FoundCount) after the Find and trap 0 results (exit script).

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