top of page
Writer's pictureDarrin Southern

URL enable your Solution Calls

Updated: Mar 11, 2021

Claris FileMaker delivers developers the ability to publish and share data in so many ways, partially with the recent inclusion of the Data API.



Traditionally, FileMaker Clients would open their locally installed FileMaker Pro client application and 'log on' to the hosted FileMaker Server solution from the 'Hosts' option.


The FileMaker of today provides so many web oriented options, including the function to allow the FileMaker Pro Clients to access this shared data, here's a quick list of a few.


OS Level URL Shortcuts.

Open URL.

Insert From URL.

Execute FileMaker Data API.



OS Level URL Shortcuts.

The Windows, Mac and iOS Operating Systems have the ability to include a shortcut on the Desktop with the Server address and Database, to allow 'double click' quick access.


fmp://<server>/<database>


Don't forget that this URL can include a Script and Multiple Parameters to run on open.


And it's worth noting that as of FileMaker 18, we can target the version of FileMaker with the fmp18:// or fmp19:// options in the URL.


A variation on the Desktop Shortcut is to deliver a Startup File to the User's Desktop.

This file is published by the FileMaker Server Web Server and is stored in this folder:

C:\Program Files\FileMaker\FileMaker Server\HTTPServer\conf\<database.fmp12>


The user can download the file with the Browser of their choice from this URL:

https://<server>/<database.fmp12>


Just remember to add the 'fmp12' extension to IIS Manager (FMWebSite) MIME types.


Open URL .

Just as we can call a URL from the Desktop, we can call the URL from within the FileMaker Client. This is via the 'Open URL' script step.


fmp://<username>:<password>@<server>/<Database>?script=<scriptname>&param=&<para01name>=<para01value>&<para02name>=<para02value>


It's worth noting that the &param= is required for FM18 and FM19 (not for FM17)


For security purposes, best practices defines the need to encode user name and password

Base64EncodeRFC ( 3548 ; <Username> & ":" & <Password> )



Insert from URL.

With a change from 'fmp://' to 'http://' protocol - we now have the option to run this call via the Web Server and therefore to receive data from the Data API.


Don't forget that the data returned is in the JSON format.

http://<server>/fmi/data/v1/databases/<Database>/layouts/<Layout>/records


Each 'Insert from URL' can, and should, include cURL options. The cURL calculation can be applied to the 'Insert from URL' script step via a Variable.


example cURL option

--header "Content-Type: application/json"


I have discussed in greater detail these cURL options in this previous blog where I talk about a real world example of an iPad sending and receiving data.


It's worth noting that most platforms (such as .Net) include the 'charset' for the Content-Type

--header "Content-Type: application/json; charset=UTF-8


Confusingly, the option to include the "charset" was supported for FM17, but is no longer supported for FM18 and FM19, you will need to exclude this from the code.



Execute FileMaker Data API.

This one is new with FM19. Rather than run the calls through 'Insert From URL' we can call the Data API from a 'single' script step.


The simplicity here is that there is no need to authenticate - as you are already within the database - and that there is no need to connect to the server - again, you are already in the database.


Also consider that any search of the data can take place from any context, so no need to swap layouts to search, then return to the current layout etc - again, the data is returned in JSON, so a level of 'deconstruction' may be needed to work with the data.


There are many 'game changer' features added to our Claris FileMaker Platform that may not seem that 'big a deal' when introduced, just like the Web Viewer.


This script step, may just be one of them . . .

102 views0 comments

Recent Posts

See All

コメント


bottom of page