
1. What you can do with the ACF plugin without ACF programming
Many FileMaker developers first meet the ACF plugin as a way to write compiled ACF packages. That is the larger story, but it is not the only story.
After the plugin is installed, FileMaker also gets a useful set of calculation functions that can be used directly in fields, scripts, button actions, conditional hiding, portal sorting, data import/export, translation workflows, dialogs, progress windows, and document handling. You can use these features without writing a single ACF function yourself.
The practical idea for this video is simple: open FileMaker's calculation dialog, type part of an ACF function name, and use the plugin as a toolbox.
- What you can do with the ACF plugin without ACF programming
- The two built-in toolboxes
- Get the complete list from your own plugin
- Read and write files
- Build text exports line by line
- Work with paths
- Format numbers and control digits
- Save logs from scripts
- Copy documents from a document store
- Use the plugin's built-in FileMaker functions
- Queue messages with AMQP and RabbitMQ
- Portal sorting without ACF programming
- Translation workflows
- Progress windows and dialogs
- Drag and drop zones
- Video outline
- Summary
1.1. The two built-in toolboxes ↑
There are two groups of functions worth knowing about:
- The plugin's built-in functions, such as
dsPD_Version,ACF_GetAllPrototypes,ACF_OpenDialog,ACF_ProgressOpen,_, and_n. - The preloaded Bootstrap package, exposed in FileMaker with the
ACFU_prefix, such asACFU_LoadFile,ACFU_SaveFile,ACFU_SelectFolder, andACFU_NumFormat.
The Bootstrap package is always present in current plugin versions. Its source is available online on this site and in the ACF library, but you normally do not need to open or modify that file. The assigned FunctionID values make most Bootstrap functions available directly from FileMaker calculations by adding the ACFU_ prefix.
Example:
Set Variable [ $text ; ACFU_LoadFile ( $path ) ]
That calls the Bootstrap LoadFile function. No ACF source code, compile step, or package loading is needed.
1.2. Get the complete list from your own plugin ↑
The fastest way to see what is installed in your current environment is:
Set Field [ Preferences::Prototypes ; ACF_GetAllPrototypes ]
This returns the prototypes for installed packages and functions. It is also a good cut-and-paste source when writing FileMaker calculations.
For the Bootstrap package, the output uses names like:
ACFU_LoadFile ( text_filename )
ACFU_SaveFile ( text_filename ; text_content )
ACFU_SelectFolder ( text_prompt )
All loaded ACF functions can also be called with ACF_run, for example:
ACF_run ( "bootstrap_AreWeLoaded" )
For everyday FileMaker script work, the direct ACFU_ form is usually easier to read, and it also offers autocomplete in the workspace.
1.3. Read and write files ↑
The Bootstrap functions give FileMaker scripts direct access to common file operations:
| Function | What it does |
|---|---|
ACFU_LoadFile ( filename ) |
Reads a text file and returns its content. |
ACFU_SaveFile ( filename ; content ) |
Writes text content to a file. |
ACFU_SelectAndGetFile ( startPath ; prompt ) |
Lets the user select a file and returns its content. The selected path is stored in $$FileName. |
ACFU_SelectFileOnly ( startPath ; prompt ) |
Lets the user select a file and returns only the path. |
ACFU_SelectFolder ( prompt ) |
Lets the user select a folder. On server, it returns the documents directory. |
ACFU_SaveFileDialogue ( prompt ; proposed_folder ; proposed_name ) |
Opens a Save dialog on client, or returns the combined file path on server. |
ACFU_FileExists ( filePath ) |
Checks if a file exists. |
ACFU_DirectoryExists ( directoryPath ) |
Checks if a folder exists. |
This is useful for import/export features, developer tools, preference setup, template handling, and support scripts where users need to choose source or destination files.
1.4. Build text exports line by line ↑
For larger exports, it is often better to open a file once, write many lines, then close it.
Set Variable [ $file ; ACFU_SaveFileDialogue ( "Save export" ; "" ; "export.txt" ) ]
If [ $file <> "" ]
Set Variable [ $fileNo ; ACFU_OpenOutputFile ( $file ) ]
Set Variable [ $res ; ACFU_WriteOutputWinFileUTF8 ( $fileNo ; "Header" & Char ( 13 ) ) ]
# Loop records here and write one line per record.
Set Variable [ $res ; ACFU_CloseFile ( $fileNo ) ]
End If
The Bootstrap package includes write helpers for Mac UTF-8, Windows UTF-8, and Windows ISO-8859-1 text output:
| Function | Typical use |
|---|---|
ACFU_OpenOutputFile ( path ) |
Opens a file and returns the file number. |
ACFU_WriteOutputMacFileUTF8 ( fileNo ; data ) |
Writes UTF-8 text using Unix line endings. |
ACFU_WriteOutputWinFileUTF8 ( fileNo ; data ) |
Writes UTF-8 text using Windows line endings. |
ACFU_WriteOutputWinFileIso8859_1 ( fileNo ; data ) |
Writes ISO-8859-1 text using Windows line endings. |
ACFU_CloseFile ( fileNo ) |
Closes the open file. |
1.5. Work with paths ↑
Path handling is a common source of small FileMaker script errors, especially in mixed Mac and Windows environments. These helpers make it easier:
| Function | What it returns |
|---|---|
ACFU_GetFilenameFromPath ( path ) |
The final filename or final path segment. |
ACFU_GetDirectoriesFromPath ( path ) |
The directory part of a path. |
ACFU_GetExtentionFromPath ( path ) |
The filename extension. The function name uses the historical spelling Extention. |
ACFU_GetPlatformString ( macString ; winString ) |
One string on Mac, another on Windows. |
ACFU_GetPlatformStringFull ( macString ; winString ; linuxString ; iOSString ) |
Platform-specific string for more platforms. |
Example:
ACFU_GetPlatformString (
"ArchiveDisk:Documents";
"\\server\ArchiveDisk\Documents"
)
1.6. Format numbers and control digits ↑
Some functions are immediately useful in ordinary FileMaker calculations:
| Function | What it does |
|---|---|
ACFU_NumFormat ( number ; comma ) |
Formats with thousands separator and two decimals. |
ACFU_NumFormatDec ( number ; comma ; decimals ) |
Formats with a chosen number of decimals. |
ACFU_AddMod10 ( number ) |
Adds a Modulo 10 control digit. |
ACFU_AddMod11 ( number ) |
Adds a Modulo 11 control digit, returning - where the algorithm calls for it. |
Example:
"NOK " & ACFU_NumFormat ( Invoice::Total ; "," )
1.7. Save logs from scripts ↑
When troubleshooting a customer solution, it is helpful to write log text to a known location:
| Function | What it does |
|---|---|
ACFU_Save_Logg ( logg ; name ) |
Creates a log file in the user's documents folder and returns the path. |
ACFU_Append_Logg ( logg ; filePath ) |
Appends more text to an existing log file. |
This lets a FileMaker script build a support log without requiring a custom export routine for every case.
1.8. Copy documents from a document store ↑
ACFU_BSBO_SaveDocumentDesktop ( docStore ; archiveSubPath ; title ) is designed for document archive solutions.
A typical portal row can have a button called "Copy to desktop". The function combines a configured document store path with a relative archive path, then copies the selected file to the user's desktop. If the user holds the Alt key, the function opens a Save dialog so the user can choose another destination.
This is especially useful in mixed Mac and Windows installations when combined with ACFU_GetPlatformString.
1.9. Use the plugin's built-in FileMaker functions ↑
These are the built-in plugin external functions available from calculations. Several of them are useful even when you are not writing ACF code.
| Area | Functions |
|---|---|
| Version and registration | dsPD_Version, ACF_RegisterPlugin |
| Document transfer and encryption | dsPD_Auth, dsPD_GetDocument, dsPD_SaveDocument, dsPD_EncryptParBlock2Base64, dsPD_DecryptBase64_2ParBlock, dsPD_AuthBase64Encrypted, dsPD_SetDocumentEncryptionKey |
| Hashing, text conversion, and samples | dsPD_SHA512_digestHex, dsPD_Text2Hex, dsPD_Text2HexInv, dsPD_GetPHPSampleEncryptDecryptCode |
| ACF package management | ACF_Compile, ACF_CompileFile, ACF_Install_base64Text, ACF_InstallFile, ACF_run, ACF_GetAllPrototypes, ACF_GetConsoleOutput, ACF_ClearPackages, ACF_ListInstalledPackages, ACF_SetCurrentNameSpace, ACF_GetNameSpace |
| Timing | ACF_StartDurationTimer, ACF_GetDuration_uSec |
| Translation | _, _n, ACF_Load_TranslationPO, ACF_Clear_Translation, ACF_UpdatePOT |
| Interface helpers | ACF_DefineDragAndDrop, ACF_UpdateDragAndDrop, ACF_RemoveDragAndDrop, ACF_ProgressOpen, ACF_ProgressUpdate, ACF_ProgressClose, ACF_OpenDialog, ACF_DialogApplyValues |
| AMQP messaging | Reintroduced in plugin version 1.8.0.2: ACF_AMQP_Initialize, ACF_AMQP_Send, ACF_AMQP_Listen, ACF_AMQP_Close() |
The ACF package management functions are included here because you can use existing packages without authoring them. For example, a developer may provide a compiled package, and the FileMaker solution can install and run it.
Use ACF_GetAllPrototypes in the installed plugin as the final truth for what your FileMaker solution can call.
1.10. Queue messages with AMQP and RabbitMQ ↑
AMQP, Advanced Message Queuing Protocol, is a standard protocol for sending messages through a message broker. RabbitMQ is a popular open-source AMQP broker. The broker sits between the sender and the receiver: FileMaker, a web shop, PHP, Python, or another system can send a small message to RabbitMQ, and another process can consume the message when it is ready.
This is useful when you do not want every event to trigger immediate heavy work. Instead of a FileMaker script calling a web API 100 times in a burst, the script can send 100 small messages quickly. RabbitMQ keeps the queue, and the worker side processes one or a few messages at a time. This makes the user interface feel faster and protects FileMaker Server, web servers, and external APIs from sudden load spikes.
AMQP support was available in the old 1.6.x plugin under the dormant dsPD_AMQP_* names. It has now been reintroduced in plugin version 1.8.0.2 with the current ACF_AMQP_* names.
Typical use cases:
- Notify a web solution that a FileMaker record has changed, then let the web worker pull the updated data.
- Let a web shop send a message when a new order arrives, so a FileMaker client or server-side process can handle the order.
- Queue many browser/UI events, such as moving blocks in a web interface, and let FileMaker process them later when idle.
- Send print jobs to a FileMaker client connected to a USB label printer at a packing line.
- Decouple slow integrations from user-facing scripts, so the user does not wait for each external call.
The AMQP functions can be used directly from FileMaker calculations and scripts:
| Function | Purpose |
|---|---|
ACF_AMQP_Initialize ( broker ; user ; password ; port ) |
Stores the RabbitMQ connection settings used by the AMQP send and listen functions. |
ACF_AMQP_Send ( functionName ; parameterList ; Queue ; routingKey ; QueueType ; recipientType ) |
Sends a message to RabbitMQ. |
ACF_AMQP_Listen ( Queue ; QueueType ; fmScript ; timeout ) |
Receives one message, or starts a persistent listener that calls a FileMaker script when messages arrive. |
ACF_AMQP_Close() |
Stops the persistent listener for the current FileMaker file. |
1.10.1. ACF_AMQP_Initialize ↑
ACF_AMQP_Initialize ( broker ; user ; password ; port )
Parameters:
| Parameter | Description |
|---|---|
broker |
Host name or IP address of the RabbitMQ server, for example 127.0.0.1 or rabbitmq.example.com. |
user |
RabbitMQ user name. For production, create a dedicated user instead of using the default guest user. |
password |
Password for the RabbitMQ user. |
port |
AMQP port, normally 5672. |
The function stores the connection settings and returns a short broker description, for example:
Broker: amqp://acf:**@127.0.0.1:5672//
Example:
Set Variable [ $$AMQP ; ACF_AMQP_Initialize ( "127.0.0.1" ; "acf" ; "acf_dev_password" ; "5672" ) ]
1.10.2. ACF_AMQP_Send ↑
ACF_AMQP_Send ( functionName ; parameterList ; Queue ; routingKey ; QueueType ; recipientType )
Parameters:
| Parameter | Description |
|---|---|
functionName |
A task or message name. With Celery-style workers this can be the Celery task name, for example proj.tasks.fetchFM. For general use, it can be your own message type, such as label.print or order.created. |
parameterList |
Carriage-return separated values. In FileMaker this is usually built with ¶. The listener returns these values as separate lines. |
Queue |
AMQP exchange name. The historical default is celery. In simple ACF/RabbitMQ setups, this can be the same as the queue name. |
routingKey |
AMQP routing key. For a simple direct exchange, use the queue name or the same value as Queue. |
QueueType |
1 means durable/permanent queue style. 0 means temporary/non-durable style. In the current send implementation this is present for compatibility. |
recipientType |
Present for compatibility. The current implementation sends the revived Celery-style JSON message format. |
Return value:
OKwhen the message was published.- A plugin error result if the broker cannot be reached or the message cannot be sent.
Example:
Set Variable [ $payload ; "client1¶Order¶12345¶manual test" ]
Set Variable [ $res ; ACF_AMQP_Send ( "acf.test.echo" ; $payload ; "celery" ; "celery" ; 1 ; 1 ) ]
In a web-shop integration, the payload could contain the shop name, order id, and action. A FileMaker listener can then pick up the message and run the order-processing script.
1.10.3. ACF_AMQP_Listen ↑
ACF_AMQP_Listen ( Queue ; QueueType ; fmScript ; timeout )
Parameters:
| Parameter | Description |
|---|---|
Queue |
Queue name to consume from. The implementation also declares a direct exchange with the same name and binds the queue to it. |
QueueType |
1 declares the queue/exchange as durable. Other values use non-durable declarations. |
fmScript |
Optional FileMaker script name. If empty, the function waits for one message and returns it. If supplied, the function can call this script with the message as script parameter. |
timeout |
Number of seconds to wait. With a script name and timeout = 0, the plugin starts a persistent listener that is polled during FileMaker idle time. |
Return value when no script is supplied:
task
message-id
arg1
arg2
...
Example, wait up to five seconds and return one message:
Set Variable [ $message ; ACF_AMQP_Listen ( "celery" ; 1 ; "" ; 5 ) ]
Example, start a persistent listener:
Set Variable [ $$AMQP_Listen ; ACF_AMQP_Listen ( "labelPrint" ; 1 ; "Handle label print message" ; 0 ) ]
The persistent listener records which FileMaker file started it. If several files are open in the same FileMaker client, this prevents the listener from accidentally calling a script in the wrong file. Only the owning file should close the listener.
1.10.4. ACF_AMQP_Close ↑
ACF_AMQP_Close()
Stops the persistent AMQP listener for the current FileMaker file and releases the listening channel.
Example:
Set Variable [ $res ; ACF_AMQP_Close() ]
Use this in shutdown scripts, when changing queue configuration, or before starting a different listener in the same FileMaker client.
1.11. Portal sorting without ACF programming ↑
Two small functions are useful for dynamic portal sorting:
dsPD_Text2Hex ( text )
dsPD_Text2HexInv ( text )
dsPD_Text2Hex converts text into a hexadecimal representation. dsPD_Text2HexInv produces an inverted value. This means one calculation field can support ascending and descending portal sort order while the FileMaker portal itself remains sorted ascending.
Example idea:
Let ( [
v = Customer::Name
] ;
If ( Customer::SortDirection = 1 ;
dsPD_Text2Hex ( v ) ;
dsPD_Text2HexInv ( v )
)
)
That is a practical plugin feature before you start writing custom ACF functions.
1.12. Translation workflows ↑
The plugin also exposes gettext-style translation functions:
_ ( "Invoice" )
_n ( "1 file" ; "%1 files" ; $count ; $count )
ACF_Load_TranslationPO ( $poFileOrContainer )
ACF_Clear_Translation
ACF_UpdatePOT ( $sourcePOT )
This gives FileMaker calculations a compact way to translate labels and messages. Plural handling is built in with _n.
1.13. Progress windows and dialogs ↑
For long-running FileMaker scripts, the progress functions can show status:
Set Variable [ $h ; ACF_ProgressOpen ( "Export" ; "Preparing..." ; 100 ) ]
Set Variable [ $res ; ACF_ProgressUpdate ( $h ; 50 ; "Half way" ) ]
Set Variable [ $res ; ACF_ProgressClose ( $h ) ]
For structured user input, the dialog functions use JSON:
ACF_OpenDialog ( $dialogJSON )
ACF_DialogApplyValues ( $dialogJSON ; $valuesJSON )
These are plugin features that can be used from FileMaker scripts and calculations. The JSON can be stored in fields, variables, or generated by script.
1.14. Drag and drop zones ↑
The drag-and-drop functions let a FileMaker layout define drop zones and callbacks:
ACF_DefineDragAndDrop ( $coords ; $callback ; $optionsJSON )
ACF_UpdateDragAndDrop ( $handle ; $coords )
ACF_RemoveDragAndDrop ( $handle )
These are client-side interface helpers, so they are intended for FileMaker Pro user sessions rather than server-side script execution.
1.15. Video outline ↑
Here is a simple flow for the video:
- Open with the message: "You can benefit from the ACF plugin before writing ACF code."
- Show
ACF_GetAllPrototypesand explain that it is the live function list from the installed plugin. - Demonstrate
ACFU_SelectAndGetFile, showing both the returned file content and$$FileName. - Demonstrate
ACFU_SaveFileDialogue,ACFU_OpenOutputFile, one write call, andACFU_CloseFile. - Show path helpers: filename, directory, and extension from the same selected path.
- Show
ACFU_NumFormatand one control digit function in the Data Viewer. - Show
dsPD_Text2HexanddsPD_Text2HexInvas the basis for portal sorting. - Show the progress window functions in a short loop.
- Close by saying that ACF programming is the next level, but the plugin already adds a practical FileMaker toolbox on day one.
1.16. Summary ↑
Without writing ACF source code, the plugin can already help with:
- File selection and file content import.
- Text export and platform-specific line endings.
- Path parsing and cross-platform path configuration.
- Number formatting and control digits.
- Script logging.
- Document store copy-to-desktop workflows.
- Portal sorting helpers.
- Translation functions.
- Progress windows, dialogs, and drag-and-drop interaction.
- Installing and running prebuilt ACF packages.
That makes the ACF plugin useful both as a developer tool and as a runtime toolbox for ordinary FileMaker solutions.
