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.

Capture Error In Simple Find Command

Featured Replies

I wanted to script a Find button for a solution I am writing. I found the following in the Help section of Filemaker pro 11

Set Error Capture [ On ]

Enter Find Mode [ Specified Find Requests: Find Records; Criteria: ClientDatabase::LastName: “Enter Last Name then press Enter Key” ] [ Restore; Pause ]

Perform Find [ ]

If [ Get ( LastError ) > 0 ]

Show Custom Dialog [ Title: "No Records Found"; Message: "No records were found. Click OK to modify your request or click Cancel to return to Browse mode."; Buttons: “OK”, “Cancel” ]

If [ Get ( LastMessageChoice ) = 1 ]

Modify Last Find

Else

Enter Browse Mode

Show All Records

End If

End If

It works well except you can't capture the error in "Modify Last Find" script step if the user doesn't find any records or clicks on cancel. I tried another "Get (LastError)" after the "Modify Last Find", but it doesn't work.

I also tried this after the last "End If"

Go to Record/Request/Page [ First ]

If [ Get ( LastError ) = 101 ]

Enter Browse Mode

Show All Records

End If

Sort Records [ Specified Sort Order: ClientDatabase::LastName; ascending ClientDatabase::FirstName; ascending ClientDatabase::DateFirstEntered; ascending ] [ Restore; No dialog ]

Adjust Window [ Resize to Fit ]

Set Error Capture [ Off ]

I thought if I captured for a found set of "0" that might work, but it didn't work.

Any suggestions. I am sure there is an easy solution but I don't see it

thanks for any help

  • 3 weeks later...

Unfortunately, you cannot detect if the user clicked Cancel when performing a find.

This is my new favorite method for performing a find: http://sixfriedrice.com/wp/using-onmodeenter-script-triggers-to-display-custom-find-layouts/

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.