Opening files using a URL

With a URL, you can start a client and open a shared or local file or run a script in a file. When the client software is installed, URL schemes are registered with the operating system so that URLs using these schemes are handled by the client.

The complete format of the URL is shown below. Optional parameters are indicated by braces ({ }). Line breaks and indention are added for legibility.

scheme://{{account:password@}address/}filename
  {?script=scriptname
    {&param=scriptparameter}
    {&option=optionvalue}
    {&$variablename{[repetitionnumber]}=value}
  }
  • scheme is one of the supported URL schemes:

    • Claris clients: claris

    • FileMaker clients:

      • fmp – The last installed version of the application handles URLs with this scheme.

      • fmpXX, where XX is the major version number of the application – Only the specified version of the application handles URLs with this scheme.

  • account:password is the account name and password to open the file with. These values work only with FileMaker clients. They should be omitted in URLs for Claris clients, which use the current user's Claris ID.

  • address is

    • the DNS name or IP address of the host

    • ~ to specify the user's Documents folder

    • $ to specify that the file is already open

  • filename is the name of the Claris Pro or FileMaker Pro file. Filenames are case sensitive for Claris Go and FileMaker Go but not for Claris Pro and FileMaker Pro. The filename extension is not required.

  • scriptname specifies the name of a script to run. Script names are not case sensitive.

  • scriptparameter passes a script parameter to scriptname. See Get(ScriptParameter) function.

  • optionvalue specifies how a running script is handled when scriptname is run. See Options for handling the current script when starting new scripts.

  • variablename, repetitionnumber, and value specify a local variable, its repetition number, and its value when scriptname is run. You can use the & symbol to append multiple local variables to the URL. See Using variables.

To open a file using a URL:

  1. Launch a web browser on the intended client machine.

  2. Enter the URL of the file into the browser’s address area using the first part of the URL format above.

    • Claris clients: claris://{address/}filename

    • FileMaker clients: fmpXX://{{account:password@}address/}filename

To run a script in a file using a URL:

  1. Follow the steps above.

  2. Append ?script=scriptname to the URL.

    You can also append additional URL parameters shown above.

Notes 

Examples

  • Opens a hosted file named My Addresses:

    claris://sales.example.com/My%20Addresses.claris
    fmp://sales.example.com/My%20Addresses.fmp12
  • Opens a local file named Clients in the user’s Documents folder and runs a script named ListClients:

    claris://~/Clients?script=ListClients
    fmp://~/Clients?script=ListClients
  • Opens a hosted file named My Addresses with FileMaker Pro 19 and specifies an account name and password:

    fmp19://MyAccount:MyPassword@sales.example.com/My%20Addresses
  • Opens a file named Clients on a host and runs a script named ListClients after resuming a paused script (option 3), specifying a script parameter of TopClients and a local variable $NumberToList with a value of 10:

    claris://sales.example.com/Clients?script=ListClients&param=TopClients&option=3&$NumberToList=10
    fmp://sales.example.com/Clients?script=ListClients&param=TopClients&option=3&$NumberToList=10
  • Runs the script ListClients from an open file named Clients:

    claris://$/Clients?script=ListClients
    fmp://$/Clients?script=ListClients
  • In a calculation, creates a URL to open a file named Clients on a host and runs the script named ListClients, specifying a script parameter that is percent-encoded:

    "claris://sales.example.com/Clients?script=ListClients&param=" & GetAsURLEncoded ( "a/b" )
    "fmp://sales.example.com/Clients?script=ListClients&param=" & GetAsURLEncoded ( "a/b" )