Advanced Custom Functions Plugin for FileMaker

Updated: 22.04.2019 - Plugin version 1.6.1.0

ACF_Functions is a new custom functions language that brings more efficient production of custom functions to FileMaker. The new language is a high-level language like PHP or PASCAL - that is very close glued into the FileMaker environment - with direct access to FileMaker variables, fields and other functions directly built into the language, but also have structured IF, For loops, While loops, - All written in text-files outside FileMaker, and compiled or loaded in with the plugin functions.

Here is the reference manual. Click on any topic in the left side to use the reference. There is also some programming examples under the heading "Examples" to get you started....

The ACF plugin

Deployment friendly

In a traditional FileMaker Solution, updates to the solution at customer site, is done by changing scripts and layouts, database definition, etc. A very tedious task for each deployed solution. The other approach is to import all the customer data into a new solution and re-implement any tailor made code for it. This is also a very tedious and time consuming task.

Having code in the ACF functions. Updates to this is very easy. It would be either load the new compiled functions into the solution using cut&paste or a small script, -OR- you could use the document service, and with an easy script load the binaries from a web-service you have deployed the code to. The web-service supports encryption that makes you sure no-one has tampered with the code.

With a click on a button, the user can re-load the ACF binaries himself, and have the changed functionality available immediately.

A word about code portability

A critical factor in development projects is its use of portable code segments. Portable code means re-use of the same code wherever needed. In a FileMaker script, this is sometimes difficult, since its use are glued to its position in the relationship graph. All the field references used in the script need to match the layouts position in the relationship graph.

As an example: You have a table for Documents, that is connected both to Orders and to Invoices. You can have documents related to them both, or individually. All the documents are stored in the same table. Then from your invoice-table, the relation is "invoice_documents", and from the orders table, the relation is "orders_documents". A set of identical scripts regarding documents need to have two duplicate versions, one for orders and the other for invoices where the script use field references workable from orders in one script, and from invoices in the other script. This example is far from portable. It is, in fact, the opposite of portable code.

If you can have one set of scripts that work from both places, you would save time.

Here is the key element of ACF. It helps you create portable code. ACF is Advanced Custom Functions. Aside from being that, you can do much more than with just custom functions. You can often replace entire scripts with an ACF function, or a group of ACF functions. When you have a portable code, you save a lot of development time because:

It requires a bit of planning to make code genuinely portable, but some factors are:

How this manual is made.

The manual is just a bunch of static HTML pages. The source text is written in "Lightpaper" in Markdown format, to facilitate code samples and formatting of the manual pages.

Then I have put this into a small FileMaker 17 applications, written some functions in the new language for Advanced Custom Functions this is all about. You can see this in the example section of this manual. You can also download it from our web-site acfplugin.com/downloads

The functions convert the Markdown formatted manual pages to HTML format. Then the HTML files are picked apart and included into a structure with a left bar, top bar and a list of pages in the left bar.

Finally, we match the HTML text against other titles in the manual and produce links to the respective manual page. The existence of a phrase in the text matching the title of another document, then it becomes a link to that page.

The parts are then merged back and saved to the HTML file again.

When adding new pages, We loop through all the document records in the database, generate HTML files and upload to the web. In this way, all the left nav's becomes replaced in all documents. The whole process of generating all the ~ 50 documents takes less than 1 second.

Good luck reading.

Ole K Hornnes
WEBAPPTECH AS