InterfaceFile ( )

Function stats

Average user rating
FileMaker 7.0 +
Date posted
24 December 2008
Last updated
24 December 2008
Recursive function

Author Info

2 functions

Average Rating 4.0



Function overview


InterfaceFile  (  )


No parameters for this function.


Tags:  Dev  

This function is called "InterfaceFile" because it might typically be useful when using the so-called Separation Model of FileMaker development. The function is nothing but a text string. The point of it is in this technique:

In some scripts or calculations we need to reference a file name as a text string (e.g. "Main Menu"). When the file in question is the same as the calc or script, we can avoid hard-coded strings with the Get(FileName) function. If it's a different file, however, we must supply a hard-coded name.

The problem is, if that file name ever changes, we must manually change our references one by one. This is tedious and error-prone. Instead, wherever a hard-coded string is required, reference this custom function instead. That way if you ever need to change the file name (perhaps just for testing purposes), you can do it easily by simply changing the custom function.


Sample input


Sample output

Main Menu


Function code

"the name of your file"

// ===================================

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit

    Prototype: InterfaceFile( )
    Function Author: Fitch (
    Last updated: 24 December 2008
    Version: 1.1

// ===================================



24 February 2009

Where do you input the function code? I must be missing the obvious.
I have a script that points to a file to open. Can I use this function to refer to a field value and open a different file? Thanks,
  General comment
25 February 2009

You must have FileMaker Pro Advanced to create or edit custom functions. Once created, these functions can be used (but not edited) in FileMaker Pro. Custom functions are defined under File > Manage > Custom Functions.

As for your second question: the Open File script step requires the file to be defined in your data sources, so no, you couldn't use this function there, nor could use use a field value.

This function is meant to be used in calculations where you would refer to the file name as a text string, e.g. imagine a script step such as:
If[ Get(FileName) = "Pretty Good File" ]

Then you decide to change your file name to "Power File Pro." You'd need to find all the places where you used "Pretty Good File" in script steps or calculations and change them. But if you had instead used:
If[ Get(FileName) = InterfaceFile ]

Then you'd simply change that one CF and that's it.
  General comment






Top Tags

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