Developer’s Guide

Table Of Contents
62 FileMaker Developer’s Guide
Using the example plug-in
To access the external functions:
1. Open the Preferences dialog box.
Windows: Choose Edit menu > Preferences.
Mac OS X: Choose FileMaker Developer application menu >
Preferences.
2. Click the Plug-Ins tab.
3. Select FMExample.
Because the example plug-in includes a function that requires
configuration, the
Configure button is enabled.
4. Click Configure.
The configuration dialog box that appears depends on how the plug-
in source code was written. The XMpl_UserFormatNumber function
in the FMExample plug-in displays the following configuration
dialog box.
5. Click OK to use the default format or type a new format.
The “#” symbols are replaced by numbers. All other text in the
format string is retained as is.
6. Click OK to close the Preferences dialog box.
7. In FileMaker Developer, choose Define menu > Database > Fields
tab.
8. Create a calculation field.
9. In the Specify Calculation dialog box, choose External Functions
from the
View drop-down list.
XMpl_UserFormatNumb
er (textOrNumber)
Returns the parameter as a text string formatted as
specified in the configuration dialog box. Use this
function to format text or numbers such as
telephone numbers, postal codes, and so on.
Formatting proceeds from right to left. Each #
symbol in the format string is replaced by the next
character in the parameter string. All remaining #
symbols are replaced with zeros.
This function demonstrates both client-only
functionality and the plug-in configuration dialog.
XMpl_FormatNumber
(formatString;
textOrNumber)
The same as XMpl_UserFormatNumber, but
formatString is provided as a parameter. This
function illustrates a function that is visible in the
Specify Calculation dialog for Auto Entry, and also
supports calls from FileMaker Server and Instant
Web Publishing.
Function’s name
and parameter Description of external function
The dialog box that appears when you configure the example plug-in