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.

GetError as code, not text

Featured Replies

I have a number of solutions in FX, now trying the Filemaker PHP API. I'd like to test the find result for the error code that indicates "No records match request."

The method getErrorString() and getMessage() both give me a text string. I know there's a numeric code hidden in there somewhere, but I don't see a method to retrieve it.

I could do this easily in FX, why not in PHP API?

Gary

  • Author

Whoa, I just figured it out. There's an undocumented method, getCode(), that yields the error code from the result if it's an error. So you still need to test for error as follows:

if(Filemaker::isError($result)) {

  echo "
Error Code: ".$result->getCode(). "";

  echo "
Error Message: ".$result->getMessage(). "";

}

Thanks to Jonathan Stark for the clues that lead me to this answer. http://jonathanstark.com/filemaker-api-for-php-documentation/FileMaker/FME.html

Add this to your cheat sheets.

Gary

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.