Jump to content

"No Records Found" in Script

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

Recommended Posts


Originally posted by mikemccloskey:

Is there a way to tell a script - When you perform a find and the results are "no records found" to continue automatically or to otherwise continue to the next step?

You can also use Status ( CurrentFoundCount ) = 0



Kurt Knippel


Database Resources

mailto:[email protected]



Link to comment
Share on other sites

The "Set Error Capture=on" script step stops FMP from displaying the messages and is definately needed here. Just remember that this step disables FMP's internal error checking and *you* the developer are now responsible for trapping errors. For instance, if you peform a find then follow it with a delete all, what will FMP do with an empty found set?

Use the Status[CurrentError] function in combination with If[] steps to provide solutions to these error situations.

Note that the Status[CurrentError] function returns the value for the script step that just immediately ran. So if you perform a find, then change layout, then check the currenterror status, the error status will be for the change layout step not the find (so it will probably be zero).

To work around this problem developers often create a global field and store the error status in the field. The example would now look like this

perform find

set field global=Status[CurrentError]

change layout


[This message has been edited by Vaughan (edited October 24, 2000).]

Link to comment
Share on other sites

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