Run web viewer JavaScript from FileMaker and get the result back.
Promises, not callbacks
fmPromise methods return a Promise, so your web viewer code reads as clean async/await instead of nested callbacks.
Type-safe Data API
executeFileMakerDataAPIRecords() returns an array of objects, with each record's portal data inlined as attributes.
Safer SQL
executeSql returns an array of arrays and inlines your parameters safely, so queries stay readable and injection-free.
Run scripts and expressions
performScript runs a FileMaker script and resolves with its result; evaluate runs an expression or sets a $$global, straight from JavaScript.
Errors become rejections
A FileMaker script result that starts with "ERROR" rejects the promise, so failures surface as ordinary JavaScript errors you can catch.
Live-reload, then ship one file
Build with a live-reloading dev server, then bundle a multi-file web app into a single minified payload you store right in your database.
From callback spaghetti to one awaited call.
The old web-viewer recipe was a maze of globals, flags, and polling loops. fmPromise replaces it with a single awaited call: ask FileMaker for data, get a Promise back, and handle the result inline.
fmPromise is open source under the MIT license. We built it, and the full source, examples, and API reference all live on GitHub.
Free for everyone.
fmPromise is open source under the MIT license. Use it in any project, commercial or not.
Drop it into any project, commercial or otherwise. No license check, no nag.
- Full source on GitHub
- Documentation and examples
- Live-reloading dev server
System Requirements
All of our products are supported on Mac, Windows, and Linux — system requirements are the same as those of FileMaker.
Common questions.
No. fmPromise is a JavaScript toolkit, not a plugin. You install it as a FileMaker add-on: download it, restart FileMaker, add it to your solution's add-ons, then drag an fmPromise module onto a layout and follow the on-screen instructions.
Nothing. fmPromise is open source under the MIT license, so you can use it in any project, commercial or not. The full source is on GitHub.
If a FileMaker script result starts with the word "ERROR", fmPromise rejects the promise. Failures surface as ordinary JavaScript errors you can catch with try/catch or .catch().
Yes. Each call carries its own id, so fmPromise resolves them correctly even when you fire several at once. They generally run one at a time, given FileMaker's single-threaded nature.
Enable external JavaScript debugging in the web viewer, then use Safari's developer tools on your web-viewer code. The fmPromise README shows the exact setting to turn on.
Need help setting up one of our products?
We are experts in FileMaker, Java, and Amazon Web Services. If you need a customized plugin, modifications to an existing plugin, or full plugin and web-app integration services, we can perform these services for you. Please reach out to us to discuss your solution needs and create an estimate.
