fm_run_script_with_globals
Set global fields and execute a FileMaker script in a single Data API session, ensuring context-dependent scripts run correctly.
Instructions
Sets global fields and runs a script in the SAME Data API session. This makes scripts that depend on global fields for context work (e.g. SESSIONS::UUID_g). Flow: Login → Set Globals → Run Script → Logout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| globals | Yes | Global fields as key/value. Keys: 'Table::FieldName_g' | |
| layout | Yes | Layout name for Data API script execution (must be based on the correct table) | |
| scriptName | Yes | Exact script name | |
| scriptParam | No | Script parameter (JSON string recommended) |