FMP URL Scheme and the 13.0v2 Improvement


FileMaker released version 13.0v2 on April 3, 2014. Its primary new feature was an improvement to their “FMP” URL Scheme. To understand what this is and why this is such a big deal, first a discussion on FMP URLs.

FMP URLs

The most important aspect of being able to fully integrate live web controls into FileMaker layouts is the use of FileMaker’s “fmp://” protocol.

Objects within a Web Viewer can use this protocol to send messages directly to your FileMaker databases, locally and without the need for a web server to host the files and without the need for the Web Publishing Engine to supply the data.

FMP URLs can directly call FileMaker scripts and pass parameters and script variables to them in real time. This means that a Web Viewer on a FileMaker layout can make a “round trip” to communicate with your database, just like built-in layout controls you are comfortable with.

FMP URLs can execute scripts within your existing database session, just like all other script triggers. This means you can continue to use your FileMaker scripting and calculation experience to manipulate what is being displayed in web viewers and fully integrate your business logic using FileMaker instead of having it all built into HTML5 and JavaScript. All of this can be done within the database itself, without the need for web hosting or web servers.

Another benefit of using FMP URLs is that FileMaker isn’t the only application that uses them. FileMaker Go on iOS can communicate with other iOS apps using their URL schemes. If you learn the URL schemes of other iOS apps, you can make clean integrations between those apps and FileMaker, all within your FileMaker scripts.

Like a “driver” that can allow normally incompatible apps to communicate with each other, URL schemes allow apps to send instructions and data to other apps. Nearly all iOS apps have their own URL “Schemes.” It’s worth checking them out.

Learn More about the FMP URL Scheme here: “Up and Running with FileMaker Go”

There are various different ways to use FMP URL. You can call a script in a hosted FileMaker (.fmp12 only) database using this URL syntax:

FMP://[[account:password@]netaddress]/databasename [?script=scriptname[&param=scriptparameter][&$variablename=value]]

Here are some other examples of ways to use these formats:

  • To open a hosted (assuming host IP =127.0.0.1) FileMaker file:

fmp://127.0.0.1/FMServer_Sample

  • To call a Script (called “CreateSeatingRecord”) in a hosted FileMaker file:

fmp://127.0.0.1/FMServer_Sample?script=CreateSeatingRecord

  • To create a dynamic calculation that triggers a script in a hosted file while setting a script parameter:

fmp://<<$$ipAddress>>/{{FileName}}?script=CreateSeatingRecord&param=hello

  • To open a FileMaker and use the same parameters, variables and script calls in a “local” file (replace the IP with “~”):

FMP://~/databasename?script=scriptname&param=hello&$seatid=1234

  • To open a FileMaker “hibernated” database in your “Documents” directory ( or “File Launcher”on Go) to do so, replace the IP with “$”:

FMP://$/databasename/script=scriptname&$GuestID=12345

  • You can even use an FMP URL to send instructions to another iOS app (in this example, pic2shop), then tell that app how to “call back” data to FileMaker Go:

pic2shop://scan?callback=fmp” & GetAsURLEncoded ( “://$/” & Get ( FileName ) & “?script=ShowScannedTicket&$result=EAN” )

Prior to version 13.0v2, this only works on a hosted FileMaker file or a FileMaker file in FileMaker Go. Significantly limiting the functionality to hosted files or local files on Go.

The new 13.0v2 update is HUGE for “fmpurl” users. In short, now there is /~/ and /$/ support in fileMaker PRO!

This is huge….a small, but mighty, update to FMP URL in this version.  This means “~”  or “$” can be used instead of the IP address to open a filemaker file and run a script. No need for file to be hosted on FIleMaker Server…or open.

So now:

  • To open a file on FileMaker PRO and use the same parameters, variables and script calls in a Pro “local” file or one not hosted or a database in Documents Folder:

FMP://~/databasename?script=scriptnamed&param=hello&$seatid=1234

  • To open a FileMaker PRO file (not hosted or a database in Documents Folder):

FMP://$/databasename/script=scriptname&$GuestID=12345

For us here at iSolutions, this means integrating the FileMaker WebViewer with FileMaker just got even easier.

Still a bummer on Windows…kinda.  FileMaker’s WebViewer uses Internet Explorer on Windows platform and this cannot be overwritten. Internet Explorer limits URLs to 2,083 characters. This means that your URL, parameters and variables cannot exceed that length. Safari is used on Mac platform for Web Viewer support and its URL length exceeds 80,000 characters. (See more browser URL length restrictions here). This isn’t a deal killer on WIN, its just the same limitation before the upgrade to FMPURL…just be aware.

We strongly recommend you play around a bit with this the FMP URL Scheme. On Go its like magic, now that magic can be brought to the desktop!

Want more resources on this topic? Click here

Print Friendly