Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

"No Records Found" in Script

Featured Replies

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?

Use the Status(CurrentError) function, if it's equal to 401, do whatever.

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

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

Don't forget to SetErrorCapture (on) before you use tests in a script. Otherwise the dialog will still be displayed. -bd

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).]

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.