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

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

Recommended Posts

Posted

quote:

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

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Posted

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

If[global=401]

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

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