Development Guide

Table Of Contents
Chapter 5
|
Developing third-party FileMaker plug-ins 39
Using the example plug-in
To access the external functions:
1. Open a file.
2. Open the Preferences dialog box.
Windows: Choose Edit menu > Preferences.
Mac OS X: Choose FileMaker Pro Advanced application menu > Preferences.
3. Click the Plug-Ins tab.
4. Select FMExample.
Because the example plug-in includes a function that requires configuration, the Configure button is
enabled.
5. 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.
6. 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.
7. Click OK to close the Preferences dialog box.
8. With your file still open, in FileMaker Pro Advanced, choose Manage menu > Database > Fields tab.
9. Create a calculation field.
10. In the Specify Calculation dialog box, choose External Functions from the View drop-down list.
XMpl_UserFormatNumber
(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