Contact Us

T: (425) 481-8175
info@portagebay.com

Twitter   Facebook   LinkedIn RSS

Subscribe to our Email Newsletter
Subscribe to our Bi-Monthly email newsletter
*



* required
Site Search
« VR Hackathon 2016 | Main | MBS Plugin Dev Highlights »
Thursday
Apr282016

Using FMP Protocol – the Good and Bad

Recently I worked on a project where the goal was to create an opener file that would run a script to determine which file to log into based on the user’s credentials. The launcher file would then open that correct file and close itself.  I determined the best way to achieve this goal was to use FileMaker Pro Protocol

The protocol format is intended to open shared or local files but it also allows you to run scripts, pass parameters and set local variables. The major benefit of using it this way is to avoid having to create external file references to the files where I want to run the scripts. This way I load the URL with the parameters I need and then use the Open URL script step to run it. 

Example:

 

One of the difficulties about using the protocol is the strictly defined format. I made a mistake in my URL and left out a “?” and there is no way to debug it. I had to stare at it for a while to see where I had missed a character. I found a module on Modular FileMaker which is basically a custom function that takes the different parameters (user name, password, host, file, script, parameters, variables) and then generates the formatted URL. I still highly recommend using FMP Protocol where appropriate. I’ve summed up some pros and cons below.

Pros

  1. No need to add extra file references
  2. FMP URL scripts run with debugger
  3. Quick and easy to implement

Cons

  1. Strict formatting of URL can be difficult to debug
  2. On Windows using IE as the default browser limit URL to 2,083 characters  (on the Mac using Safari it is 80,000)
  3. Local variables set using the URL can appear to pop up in a script instead of being explicity initialized. To work around this you can either add comments at the top of the script or run additional set variable script steps to re-initialize them.

~Kate Waldhauser

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>