Jump 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.

Suppressing the No Records Found error message

Featured Replies

FM 11 Advanced

I always thought that to suppress an error message when no records were found that you needed to have an if statement immediately after the find to capture the error code. I use the following script steps to allow the user to do repeated finds until one of them is successful. It does not even use an If statement, and the error message does not appear if a find fails. It does however use an Exit Loop If statement.

Allow User Abort [ Off ]

Set Error Capture [ On ]

Go to Layout [ “Find customer” (Customer) ]

Loop

Enter Find Mode [ ] [ Pause ]

Perform Find [ ]

Set Variable [ $E; Value:Get ( LastError ) ]

Exit Loop If [ $E ≠ 401 ]

Show Custom Dialog [ Title: "no record"; Message: "The record does not exist. Press OK and try again."; Buttons: “OK” ]

End Loop

So, what is the correct technique to suppress the No Records Found Error message?

I always thought that to suppress an error message when no records were found that you needed to have an if statement immediately after the find to capture the error code.

No, the error messages are suppressed by Set Error Capture [ On ]. Your script would work the same as:

Allow User Abort [ Off ]

Go to Layout [ “Find customer” (Customer) ]

Set Error Capture [ On ]

Loop

Enter Find Mode [ Pause ]

Perform Find [ ]

Exit Loop If [ Get ( LastError ) ≠ 401 ]

Show Custom Dialog [ Title: "no record"; Message: "The record does not exist. Press OK and try again."; Buttons: “OK” ]

End Loop

Create an account or sign in to comment

Important Information

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

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.