Gary Hoffman Posted November 9, 2010 Posted November 9, 2010 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
Gary Hoffman Posted November 9, 2010 Author Posted November 9, 2010 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
Recommended Posts
This topic is 5384 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 accountSign in
Already have an account? Sign in here.
Sign In Now