Advanced Custom Functions Plugin for FileMaker

Updated: 15.09.2023 - Plugin version 1.6.3.0

ACF_Functions introduces a new custom functions language designed to enhance the efficiency of custom function development within FileMaker. This new language is a high-level language, akin to PHP or PASCAL, meticulously integrated into the FileMaker environment. It grants direct access to FileMaker variables, fields, and other built-in functions, all defined within text files external to FileMaker. These files can be compiled or loaded into the FileMaker environment using the plugin's functions. The compiled libraries are encoded in Base64 format, so they can be loaded directly from FileMaker Text fields.

Let us do a small example, where we want to pull the content of a web page and store it on a user-selectable file. This is an example of how this functions looks like:

Before this function can be run, it has to be compiled. This can easily be done with ACF_Compile function. Note: The HTTP_GET is a new command in ver 1.7.0 available for Mac, while earlier versions is available for both Windows and Mac. We will release the Windows version of 1.7.0 in desember / january.

For the last option, this looks like this:

First "Insert Text" Script step:

And then the script. We check for the occurrence of "=== START ===" in it, as this is the start of the base64 encoded binary package, that is already loaded when you have compiled.

Now we altered the script so we can run it too:

Then press run on it, and we get the "save as file dialogue":

And finally, we open it up in safari:

The language

Compared to regular Custom Functions, which are essentially parameterized calculations, much like the calculations you can utilize in a Set Variable statement within a script, ACF functions provide enhanced capabilities. While standard Custom Functions offer the possibility of employing inline "if" and "Case" statements for conditional calculations and are well-suited for simple tasks, they can become challenging for the programmer when nested Ifs and Cases proliferate, making it difficult to decipher the logical flow within the calculation. Consequently, they present challenges in terms of maintenance and debugging. In contrast, the ACF language is intentionally structured in a procedural manner, similar to scripts. ACF functions share similarities with custom functions, featuring parameters and return values, but they also grant direct access to the file system, SQL queries, FileMaker variables, and fields. Moreover, ACF functions execute rapidly since they are compiled. Having used the Plugin we developed for several years, I can attest to its stability. Numerous customers rely on solutions we've created, many of which involve implementing complex logic through ACF functions.

Round up

This example shows how easy it is to implement and run ACF functions in your application. However, integrating the "ACF-DevStarter" application from our website gives you an environment where you can develop the functions, compile them, and later have loading of the compiled binaries into your application in the StartUp script is far more effective, even if it's a little work (10 min) to integrate this. For more information, demos, and such, look at more in this reference manual browsing the left menu for many articles, and programming examples. We also have some videos that showcase the plugin in practical use. In the demo section, you find the videos and also where you can download the plugin for use in your system.

We wish you an enjoyable reading experience.

Ole K Hornnes
HORNEKS ANS