BaseFileName ( )

Function stats

Average user rating
486
374
9999
Support
FileMaker 10.0 +
Date posted
22 January 2015
Version
1
Recursive function
No

Author Info
 malcolm

1 functions

Average Rating None

author_avatar



 

Function overview

Prototype

BaseFileName  ( TOName )


Parameters

TOName  text, the table occurrence name


Description

Tags:  Table Occurrence   Table   external data source  

This function determines the file name containing the table occurrence passed to it.

The function is case sensitive so it is probably best to obtain the table name dynamically, e.g., Get ( LayoutTableName ).

Why? It is possible to run scripts with full access privileges but the raised privileges only apply to data tables within the current file. Scripts operating on data from other files will fail with data access errors.

The result of this function can easily be compared with Get (FileName) to determine whether the data is internal or external. Data separated solutions can use the result to determine which external data source to call.

Examples

Sample input

BaseFileName ( Get( LayoutTableName) )


Sample output

flex_crm

 

Function code

/*
with thanks to steve_ssh

notes: TOName is case sensitive

2015
Malcolm Fitzgerald
malcolm@notyourhomework.net
*/

ExecuteSQL( "SELECT BaseFileName FROM FileMaker_Tables WHERE TableName = ?"; ""; ""; TOName )

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

    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/374

    Prototype: BaseFileName( TOName )
    Function Author: malcolm (http://www.fmfunctions.com/mid/486)
    Last updated: 22 January 2015
    Version: 1

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

 

 

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (32)
Date  (28)
XML  (26)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Layout  (15)
Interface  (15)
Text  (14)
Filter  (12)
Variables  (12)
Layout Objects  (11)
Design  (10)
Array  (8)