
1. Progress bars
This page describes the native progress-bar functions introduced in ACF Plugin version 1.7.9.3 and available on both macOS and Windows.
1.1. Introduction ↑
The ACF Plugin can display native progress windows while FileMaker scripts or compiled ACF functions perform lengthy work. A progress window has a title, a status message, a progress indicator, and a numeric handle.
The handle identifies the window in later update and close calls. Several progress windows can exist at the same time; they are independent and are stacked around the active FileMaker window.
Progress bars can be used from:
- Compiled ACF functions.
- FileMaker calculations.
- FileMaker plugin script steps for update and close.
For ad hoc input dialogs, see Ad hoc dialogs with open_dialog.
1.2. Display Modes ↑
Two display modes are available:
- Determinate: use values from zero through the configured maximum.
- Indeterminate: pass a negative value to an update call to display the animated barber-pole indicator. A later non-negative value returns it to determinate mode.

1.3. Progress Bars In ACF Functions ↑
The ACF language provides three operations:
int handle = progress_open(title, message, maximum);
progress_update(handle, value, message);
progress_close(handle);
progress_open returns a numeric handle. progress_update and progress_close are statements and do not return values.
Example:
function ProcessRecords(int recordCount)
int handle = progress_open(
"Updating records",
"Preparing...",
recordCount
);
int i;
for (i = 1, recordCount)
// Perform work for record i here.
progress_update(
handle,
i,
format("Processing record %d of %d", i, recordCount)
);
end for
progress_close(handle);
return recordCount;
end
For work where the total cannot be calculated in advance:
int handle = progress_open("Import", "Connecting...", 100);
progress_update(handle, -1, "Receiving data...");
// Perform work with an unknown duration.
progress_update(handle, 80, "Finishing import...");
progress_close(handle);
The progress window remains responsive while the ACF function runs.
1.4. Progress Bars In FileMaker Calculations ↑
The corresponding external calculation functions are:
ACF_ProgressOpen ( title ; message ; maximum )
ACF_ProgressUpdate ( handle ; value ; message )
ACF_ProgressClose ( handle )
ACF_ProgressOpen returns the handle. The update and close functions return 1 when the handle was found and the operation succeeded.
A FileMaker script can control a progress window entirely through calculations:
Set Variable [ $progress ; Value: ACF_ProgressOpen ( "Export" ; "Preparing..." ; $recordCount ) ]
# Perform work and update $current in a loop.
Set Variable [ $updated ; Value: ACF_ProgressUpdate ( $progress ; $current ; "Exporting record " & $current ) ]
Set Variable [ $closed ; Value: ACF_ProgressClose ( $progress ) ]
The handle is not tied to the individual calculation call. It can be stored in a FileMaker variable, passed between scripts, or returned from an ACF function and used in later calls.
1.5. Progress Script Steps ↑
FileMaker also registers these native plugin script steps:
- ACF Progress Update
Handle- calculation returning the progress handle.Value- calculation returning the new progress value. A negative value selects indeterminate mode.Message- calculation returning the new status text.
- ACF Progress Close
Handle- calculation returning the progress handle.
A common pattern is to open the progress window with ACF_ProgressOpen in a Set Variable step, update it with ACF Progress Update inside a loop, and finish with ACF Progress Close.
The same handle can cross the boundary between ACF and FileMaker. For example, an ACF function can open a progress window and return its handle, after which a FileMaker script can update or close it. Likewise, a FileMaker calculation can open a window whose handle is passed into an ACF function.
1.6. Practical Notes ↑
- Always close a progress window when the operation completes or is cancelled.
- Keep the handle in a variable whose lifetime covers all update and close calls.
- Use determinate progress when the total amount of work is known; use a negative update value otherwise.
- Progress windows are non-modal and are intended to remain visible while work continues.
- Native progress windows require a graphical FileMaker client and are not available in headless FileMaker Server execution.
