A SERVICE OF

logo

46 FileMaker Pro Advanced Development Guide
Description of the FMExample plug-in’s
external functions
The FMExample plug-in provided in the Microsoft Visual C++, Apple
Xcode, and CodeWarrior example projects adds the following
external functions to FileMaker
Pro, FileMaker Pro Advanced,
FileMaker Server, and FileMaker
Server Advanced.
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 Pro Advanced 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.
Function’s name
and parameter Description of external function
XMpl_Add
(number1; number2)
Adds number1 and number2 together and returns
the result. The function is the same as the plus
operator in the calculation engine.
XMpl_Append
(textToAppend ...)
Takes a multiple list of parameters, concatenates
them, and returns the result. The function is the
same as the ampersand operator in the calculation
engine.
XMpl_Evaluate
(calcToEvaluate)
Takes a simple or complex calculation, evaluates
the calculation, and returns the result. Any
calculation supported by FileMaker can be passed
to this function. The function is identical to the
Evaluate function in the calculation engine.
XMpl_NumToWords
(number)
Returns a number in bank check format. For
example 44.345 returns Forty-Four Dollars and 34
Cents. All digits beyond the second decimal place
and any alphabetical characters are ignored.
XMpl_StartScript
(filename; scriptname)
Runs the script specified by the scriptname
parameter on the file specified by the filename
parameter.
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, FileMaker
Server Advanced, and Instant Web Publishing.
Function’s name
and parameter Description of external function