Function overview
Prototype
FM.field.get.fieldName (
_fullFieldName )
Parameters
_fullFieldName
Description
Tags:
Dev Design
Extracts the field name from a full field name, including the repetition number
FM.field.get.fieldName ( "table::field[repetition]" ) = "field[repetition]"
Error is trapped in $$ERROR.CF
Examples
Sample input
FM.field.get.fieldName ( "table::field[repetition]" )
Sample output
"field[repetition]"
Function code
/*
FM.field.get.fieldName ( _fullFieldName )
by Fabrice Nordmann, 1-more-thing
http://www.1-more-thing.com
Apr 2011
Extracts the field name from a full field name, including the repetition number
FM.field.get.fieldName ( "table::field[repetition]" ) = "field[repetition]"
Error is trapped in $$ERROR.CF
*/
Case (
PatternCount ( _fullFieldName ; "::" ) ;
GetValue ( Substitute ( _fullFieldName ; "::" ; ¶ ) ; 2 )
)
& Let (
$$ERROR.CF = Case ( EvaluationError ( GetField ( _fullFieldName )) = 102 ; "ERROR 102. FM.field.get.fieldName ( " & Quote ( _fullFieldName ) & " ) has thrown an Evaluation Error 102 (field missing)." & Case ( not IsEmpty ( Get ( ScriptName )) ; "¶Script: " & Get ( ScriptName )) & Case ( not IsEmpty ( Get ( ScriptParameter )) ; "¶Parameter: " & Get ( ScriptParameter ))) ; "" )
// ===================================
/*
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/303
Prototype: FM.field.get.fieldName( _fullFieldName )
Function Author: Fabrice (http://www.fmfunctions.com/mid/37)
Last updated: 21 April 2011
Version: 1
*/
// ===================================
/*__LITBR__FM.field.get.fieldName ( _fullFieldName )__LITBR____LITBR__by Fabrice Nordmann, 1-more-thing__LITBR__http://www.1-more-thing.com__LITBR____LITBR____LITBR__Apr 2011__LITBR____LITBR__Extracts the field name from a full field name, including the repetition number__LITBR____LITBR__FM.field.get.fieldName ( "table::field[repetition]" ) = "field[repetition]"__LITBR____LITBR____LITBR__Error is trapped in $$ERROR.CF__LITBR__*/__LITBR____LITBR____LITBR__Case (__LITBR__ PatternCount ( _fullFieldName ; "::" ) ;__LITBR__ GetValue ( Substitute ( _fullFieldName ; "::" ; ¶ ) ; 2 )__LITBR__)__LITBR____LITBR__& Let (__LITBR__ $$ERROR.CF = Case ( EvaluationError ( GetField ( _fullFieldName )) = 102 ; "ERROR 102. FM.field.get.fieldName ( " & Quote ( _fullFieldName ) & " ) has thrown an Evaluation Error 102 (field missing)." & Case ( not IsEmpty ( Get ( ScriptName )) ; "¶Script: " & Get ( ScriptName )) & Case ( not IsEmpty ( Get ( ScriptParameter )) ; "¶Parameter: " & Get ( ScriptParameter ))) ; "" )__LITBR____LITBR__// ===================================__LITBR__/*__LITBR____LITBR__ This function is published on FileMaker Custom Functions__LITBR__ to check for updates and provide feedback and bug reports__LITBR__ please visit http://www.fmfunctions.com/fid/303__LITBR____LITBR__ Prototype: FM.field.get.fieldName( _fullFieldName )__LITBR__ Function Author: Fabrice (http://www.fmfunctions.com/mid/37)__LITBR__ Last updated: 21 April 2011__LITBR__ Version: 1__LITBR____LITBR__*/__LITBR__// ===================================