fm.errorcodes.json
Returns all default FileMaker 17 error codes as a JSON object { error : {} } stored in a global variable $$JSON_fmErrorCodes
Be the first to rate this function Log in to vote
Daz Lunn - Show more from this author |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Back-story:
I've returned to FileMaker after ten years away. A lot has changed; for the better. I was learning the JSON function syntax. This CF seemed a fun thing to do whilst re-learning. Actually, it turned out to be quite useful in re-learning FM errors. So, I thought I would share it.
Whether this CF has real world use-cases, I'm not sure. Maybe.
So, it basically creates a global variable ($$JSON_fmErrorCodes), which contains the JSON object { error : { } }. I call this a reference object, because I use it similarly to how I would use a Dictionary.
You interrogate the error object thus: JSONGetElement ( $$JSON_fmErrorCodes ; "error." & Get ( LastError ) ) ... it returns the text description of the FM error (see CF Definition text, for reference).
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.