Scripting
Script steps, patterns, error handling, and loops — the core of FileMaker development.
How to pass a JSON parameter to a FileMaker script
Script parameters are a single text value. Learn why JSON is the right way to pass multiple values, and how to read them back inside a script.
FileMaker script error handling with Set Error Capture
Learn the mandatory error handling pattern for FileMaker scripts: suppress dialogs, check Get(LastError) after every risky step, and exit cleanly with diagnostic information.
Looping through a found set in FileMaker
Learn the reliable counter-loop pattern for iterating through records. Understand why "Exit after last" is unreliable and how to build loops that always terminate correctly.
FileMaker Set Variable — scope, naming, and when to use it
Understand the difference between local and global variables, when to use each, and the naming conventions that keep scripts readable.
FileMaker script triggers: OnObjectEnter, OnObjectExit, OnObjectSave, OnRecordCommit
Script triggers fire automatically in response to user actions. Learn the four most important object and record triggers and how to attach scripts to them without creating infinite loops.
Perform Script on Server (PSOS): when to use it and how it works
PSOS runs a script on the FileMaker Server engine instead of on the user's machine. Learn when it helps performance, what the headless environment means for your script design, and the difference between synchronous and asynchronous execution.
Go to Related Record: navigating via relationship in FileMaker
Go to Related Record (GTRR) is one of the most powerful navigation steps in FileMaker — and one of the easiest to misuse. Learn how to navigate to related records correctly and what "show only related records" actually does.
New Record and Delete Record script steps
Creating and deleting records programmatically are fundamental scripting tasks. Learn how to use New Record/Request and Delete Record/Request correctly, and how to confirm deletion with the user.
Set Field and Set Field By Name in FileMaker scripts
Set Field writes a value into a specific field. Set Field By Name uses a calculated field name, enabling dynamic field targeting. Learn both steps and when to use each.
Perform Find: scripting finds and handling error 401
Learn how to script a find in FileMaker using Enter Find Mode and Perform Find, set find criteria in variables, and gracefully handle the common error 401 "no records found" result.
Replace Field Contents: batch field updates in FileMaker
Replace Field Contents updates a field in every record in the current found set in a single step — making it the fastest way to batch-update data. Learn serial, value, and calculated replace modes.
Sort Records in FileMaker scripts
Learn how to sort a found set using Sort Records [Restore] and dynamic sort options, when to unsort for performance, and how Sort interacts with portals.
Show Custom Dialog: prompts, confirmations, and input fields
Show Custom Dialog lets you display a message with up to three custom buttons and up to three input fields. Learn how to read the button result and access field input from inside a script.
Exit Script [Result] and reading results with Get(ScriptResult)
FileMaker scripts can return a single value to their caller using Exit Script [Result]. Learn how to return structured JSON results, read them with Get(ScriptResult), and establish a consistent success/error pattern.
Sub-scripts: calling scripts from scripts in FileMaker
Breaking logic into reusable sub-scripts is the foundation of maintainable FileMaker development. Learn the parameter/result pattern, how to call sub-scripts, and how to structure a multi-script workflow.
Go to Portal Row and looping through portal rows in FileMaker
Portals display related records as rows, and Go to Portal Row lets you navigate and loop through each row in a script. Learn the portal loop pattern and how to avoid the common off-by-one mistake.
Using the FileMaker Script Debugger and Data Viewer
The Script Debugger and Data Viewer are FileMaker Pro's built-in debugging tools. Learn how to step through scripts, set breakpoints, and inspect variables and field values in real time.
Open URL: web links, mailto, and FileMaker deep links
The Open URL script step launches a URL in the default browser, opens a mail client with mailto:, or triggers another FileMaker file with an fmp:// deep link. Learn the syntax for each use case.
Insert from Device: camera, audio, and signature on FileMaker Go
Insert from Device lets FileMaker Go apps access the device camera, microphone, and signature capture. Learn how to insert media into container fields and handle the FileMaker Go-only limitation.
Window management in FileMaker: New Window, Adjust Window, Close Window
FileMaker supports multiple windows in a single session. Learn how to open new windows for modal-style workflows, resize and position them with Adjust Window, and close them cleanly from a script.
FileMaker script commenting conventions
Comments make scripts maintainable. Learn the # Comment step, the standard documentation header, and when a comment adds value vs when it just adds noise.
Commit Records/Requests: when and how to commit in FileMaker scripts
Commit Records/Requests writes in-progress field changes to the database. Learn when FileMaker commits automatically, when you must commit explicitly, and how to use "No dialog" to suppress the commit dialog.
Show All Records, Omit Record, and Omit Multiple Records in FileMaker
Found set management beyond Perform Find: learn how to restore the full found set, omit individual records, and build an inverse found set by omitting a subset.
Designing FileMaker scripts for Data API calls
Scripts called via the FileMaker Data API run headless with JSON in and JSON out. Learn the design patterns that make scripts reliable, testable, and safe to expose through the API.