Run Script
filemaker.run_script
ActionDatabases & warehousesconnection required
Calls the FileMaker API with the connection's credentials.
Run a FileMaker script in the context of a layout.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Username & password
- Providers
- FileMaker
- Secret shape
- {"username": "…", "password": "…"} — a FileMaker account with the fmrest extended privilege
- Config it needs
- base_url, database, api_version
- Resolved by
- config.connection_id, else node.connection_id
Configuration
3 fields, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
layout Name of the FileMaker layout to work through; it decides which fields and portals the Data API can see. | string | Yes | — | — | Contacts |
script Name of the script to run; it must be unique in the file, because the Data API cannot choose between two scripts of the same name. | string | Yes | — | — | Send Invoice |
script_param Text passed to the script as its script parameter. | string | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"layout": "Contacts",
"script": "Send Invoice"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
layout The layout the script ran on. | string | — |
script The script that was run. | string | — |
script_error FileMaker's script error code; '0' means the script finished cleanly. | string | — |
script_result Whatever the script returned through Exit Script, when it returned anything. | string | — |
{
"layout": "",
"script": "",
"script_error": "",
"script_result": ""
}Notes
- The script runs under the account on the connection, so it can only do what that account's privilege set allows.
Related FileMaker nodes
See Run Script run in a workflow.
In a technical demo we add the FileMaker connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.