getError ( )

Function stats

Average user rating
166
425
9999
Support
FileMaker 10.0 +
Date posted
27 June 2019
Version
1
Recursive function
No

Author Info
 Josh Ormond

7 functions

Average Rating None

author_avatar



 

Function overview

Prototype

getError  (  )


Parameters

No parameters for this function.


Description

Tags:  error  

Returns the result of Get ( LastError ), and sets two additional variables named $errorDetail, and $errorMessage.
• Get ( LastExternalErrorDetail ) in FM16, or above, returns the account name of the user with the record lock.
• errorMessage ( ) returns the text of the description of the error number from the Get ( LastError ) function.

Requires the custom function errorMessage ( ): http://fmfunctions.com/fid/424

Examples

Sample input

getError


Sample output

Function result: 301
$errorDetail: account name of the user with the record lock
$errorMessage: "ERROR # 301: Record is in user by another user" ( no quotes )

 

Function code

/***************************************
*
*    Function Name:        getError
*    Parameters:        none
*    Purpose:            Returns the result of Get ( LastError ), and sets an additional variable named $errorDetail, and $errorMessage.
*    Notes:            • Get ( LastExternalErrorDetail ) in FM16, or above, returns the account name of the user with the record lock.
*                    • errorMessage ( ) returns the text of the description of the error number from the Get ( LastError ) function.
*    Dependencies:        Custom Function: errorMessage ( errorNumber ).
*    Change log:        2018-12-10 JO - Initial build.
*
*****************************************/

Let (

[

theError = Get ( LastError ) ;
$errorDetail = Get ( LastExternalErrorDetail ) ;
$errorMessage = errorMessage ( theError ) ;

result = theError

] ;

result

)

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/425

    Prototype: getError( )
    Function Author: Josh Ormond (http://www.fmfunctions.com/mid/166)
    Last updated: 27 June 2019
    Version: 1

*/
// ===================================