Database Reference
In-Depth Information
▪ You can reorder parameters by dragging them up or down in the list.
NOTE
Be careful adding, reordering, or deleting parameters for an existing function. If the function is
being used in a calculation somewhere, then that calculation breaks because it no longer passes
the right parameters back to the function. On the other hand, it's safe to rename a function or its
parameters—FileMaker updates any existing calculations when you do.
▪ If you click Duplicate, then FileMaker makes an exact copy of the selected function.
That way, you can use a custom function as a starting point for creating a new one.
▪ If you don't need a function anymore, select it and then click Delete.
NOTE
Unlike built-in functions, custom functions can be recursive , meaning a custom function can run it-
self repeatedly until a given condition has been met. To learn about recursion, find yourself a nice,
quiet place where you can concentrate, and skip ahead to Script Parameters .
Sharing Custom Functions
Custom functions reside within individual FileMaker database files. So if you've come up
with a spectacular custom function you want to reuse in another database, you'll have to
move it over there first. Happily, you have two easy ways to move these bundles of code
between databases.
WARNING
Whichever method you choose for sharing Custom Functions among databases, be certain to test
each function at its new location. Custom functions can reference other custom functions, but if you
copy or import one custom function without the others it relies on, FileMaker doesn't warn you of
your omission . It does, however, comment out the imported function's calculation, a sure sign
something is awry. As you bring custom functions into a new file, select each one in the Manage
Custom Functions dialog box and then click Edit. If you see the calculation wrapped in /* comment
markers */ you've got a missing reference to track down.
The Manage Custom Functions dialog box sports an Import button, which you can see in
Figure 13-14 ; it's the third button from the right. Click Import and then select another
FileMaker database file to behold the Import Custom Functions dialog box, shown in Fig-
Search WWH ::




Custom Search