Claris FileMaker
Claris FileMaker is a database app platform. Protocol Launcher allows you to generate FileMaker Pro URLs for opening files and running scripts.
Usage
There are two ways to use this library:
- On-Demand import from subpaths enables tree-shaking and keeps bundles small.
- Full Import from the root package is convenient but includes all app modules.
Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.
Select Installation Method
URL Methods
The helpers below mirror Claris's official Opening FileMaker Pro files using a URL documentation. Only the documented file-opening URL and script URL parameters are exposed: script, param, option, and local variables.
Open File
Open a shared or local FileMaker Pro file. The official URL format supports fmp for the last installed version and fmpXX for a specific major version. The address can be a DNS name or IP address, ~ for the user's Documents folder, or $ for an already open file. The optional credentials payload maps to the documented account:password@ URL segment; examples omit credentials.
import { openFile } from 'protocol-launcher/filemaker'
const hostedUrl = openFile({
address: 'sales.example.com',
filename: 'My Addresses.fmp12',
})
const documentsUrl = openFile({
address: '~',
filename: 'Clients',
})
const versionedUrl = openFile({
version: 22,
address: 'sales.example.com',
filename: 'My Addresses',
})Run Script
Run a FileMaker script in a shared, local, or already open file. The official format allows a script parameter, an option value for handling a running script, and multiple local variables.
import { runScript } from 'protocol-launcher/filemaker'
const localUrl = runScript({
address: '~',
filename: 'Clients',
script: 'ListClients',
})
const parameterUrl = runScript({
address: 'sales.example.com',
filename: 'Clients',
script: 'ListClients',
param: 'TopClients',
option: 3,
variables: [{ name: 'NumberToList', value: 10 }],
})
const openFileUrl = runScript({
address: '$',
filename: 'Clients',
script: 'ListClients',
})