How to Create Custom Functions in Filemaker
FileMaker Pro Advanced provides FileMaker programmers with a utility to create custom functions in FileMaker databases. A custom function can be included in calculations and FileMaker scripts alongside text, database and mathematical functions. These are useful because they makes scripts and calculations easier to read, and can be used to hide the inner workings of a calculation when it is protected intellectual property.
Instructions
-
-
1
Open the database to which you wish to add a custom function in FileMaker Pro Advanced.
-
2
Choose "Manage" from the "File" menu, then select "Custom Functions" in the submenu.
-
-
3
Click the "New" button to create a custom function. Enter the name of the function in the dialog box.
-
4
Create a formula that calculates your function in the formula entry field. This operates the same as creating a new calculation field in standard FileMaker programming.
-
5
Add parameters to your formula as necessary. A parameter is a variable that can be passed to the function by the programmer. For example, the standard FileMaker function "Round(1.2345,2)" has two parameters, which represent the number to be rounded and the rounding precision. Type the name of the parameter in the parameter list, then click the "+" button. Double-click on the parameter to insert it into your formula.
-
6
Set the "Availability" of the function if it should only be used by particular user accounts, or leave the default at "all accounts" for your function to be available to all scripts, calculations and users.
-
7
Click "OK" to finish and save the function. You can now use this function in scripts and calculations.
-
1