Running scripts through Shortcuts
With FileMaker Pro and FileMaker Go, you can run FileMaker scripts through the Shortcuts app or by Siri voice commands in macOS, iOS, and iPadOS. To do so, enable each script to be donated to Shortcuts in your FileMaker Pro file, and create a shortcut for the scripts. Then, run the shortcut to run the scripts.
Creating and running shortcuts:
-
In FileMaker Pro, open the file and set up script donation:
-
Enable the fmurlscript extended privilege for any privilege set that needs to run shortcuts. See Editing extended privileges for a privilege set.
-
In the Script Workspace, select one or more scripts and choose Scripts menu > Enable Shortcuts Donations. See Creating and editing scripts.
Scripts are donated to Shortcuts as soon as these settings are enabled on the current Mac or the first time the file is opened by FileMaker Pro on another Mac or by FileMaker Go on an iOS or iPadOS device. For a hosted file, these changes are effective for connected clients shortly after they're made.
-
-
In Shortcuts, create a shortcut that uses the donated scripts. In the shortcut:
-
Search for the FileMaker Pro app (macOS) or FileMaker Go app (iOS, iPadOS) and add the Run FileMaker Script action to the shortcut.
-
Specify the file, a script, and an optional script parameter.
-
-
To run the shortcut created in step 2:
-
In Shortcuts, run the shortcut.
-
Using Siri, say the shortcut's name.
The first time the shortcut runs, you may be asked to allow the new shortcut to share data with FileMaker Pro. For each Run FileMaker Script action in the shortcut, FileMaker Pro or FileMaker Go opens (if it's not already open), the file specified in the action opens, and the script runs.
-
For more information on creating and running shortcuts, see Shortcuts documentation.
Notes
-
By default, all files containing donated scripts are enabled to run them. To disable all donated scripts in a file from running through Shortcuts, FileMaker Pro or FileMaker Go users can disable the file in Settings. For FileMaker Pro, see Changing Shortcuts settings (macOS). For FileMaker Go, see FileMaker Go Development Guide.
-
Shortcuts can open either local or hosted FileMaker Pro files to run scripts. As when opening a FileMaker Pro file by any method, you may need to sign in when a shortcut opens the file. To avoid signing in to a file each time a shortcut runs, select Save password in Keychain Access when you sign in or set the Log in using option in the File Options dialog box in FileMaker Pro.
-
If you specify a script parameter in a shortcut, use the Get(ScriptParameter) function in your FileMaker script to get the parameter's value.