FM.field.get.tableName ( )

Function stats

Average user rating
37
304
9999
Support
FileMaker 8.0 +
Date posted
21 April 2011
Version
1
Recursive function
No

Author Info
 Fabrice

70 functions

Average Rating 4.4

author_avatar



 

Function overview

Prototype

FM.field.get.tableName  ( _fullFieldName )


Parameters

_fullFieldName  


Description

Tags:  Dev   Design  

Extracts the table name from a full field name, including the repetition number

FM.field.get.fieldName ( "table::field[repetition]" ) = "table"


Error is trapped in $$ERROR.CF

Examples

Sample input

FM.field.get.fieldName ( "table::field[repetition]" )


Sample output

"table"

 

Function code

/*
FM.field.get.tableName ( _fullFieldName )

by Fabrice Nordmann, 1-more-thing
http://www.1-more-thing.com

Apr 2011

Extracts the table name from a full field name, including the repetition number

FM.field.get.tableName ( "table::field[repetition]" ) = "table"


Error is trapped in $$ERROR.CF
*/


Case (
    PatternCount ( _fullFieldName ; "::" ) ;
    GetValue ( Substitute ( _fullFieldName ; "::" ; ¶ ) ; 1 )
)

& Let (
    $$ERROR.CF = Case ( EvaluationError ( GetField ( _fullFieldName )) = 102 ; "ERROR 102. FM.field.get.tableName ( " & 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/304

    Prototype: FM.field.get.tableName( _fullFieldName )
    Function Author: Fabrice (http://www.fmfunctions.com/mid/37)
    Last updated: 21 April 2011
    Version: 1

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

 

 

 

 

 

 

 

Top Tags

Text Parsing  (31)
Date  (26)
List  (25)
XML  (22)
Format  (22)
Sql  (18)
Dev  (17)
Debug  (14)
Text  (13)
Variables  (12)
Interface  (12)
Layout  (11)
Filter  (10)
Design  (9)
Array  (7)
Layout Objects  (7)