I recently 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 the 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.
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 that takes the different parameters (user name, password, host, file, script, parameters, variables) and then generates the formatted URL. I still highly recommend using the FMP Protocol where appropriate. I’ve summed up some pros and cons below.
- No need to add extra file references;
- FMP URL scripts run with debugger;
- Quick and easy to implement.
- Strict formatting of URL can be difficult to debug;
- On Windows using IE as the default browser, the URL is limited to 2,083 characters (on the Mac using Safari it is 80,000);
- 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.
FileMaker Layout Tips
I do a lot of fiddling with layout designs for a lot of our different FileMaker projects, and there’s a few useful things I’ve learned, mostly by accident or by blundering around. If you don’t already know these, maybe it will save you some time…
The day I realized I could have multiple inspectors open was a happy day for me. No more jumping from position tab to data tab, then back again for the next field I needed to review. Just pop open another Inspector window so you can have one for one tab and one for another (heck, if you have a really big screen, why not have one for each?!). To open another Inspector, just select “New Inspector” from the View menu.
We recently got feedback from our E-Com customers that some of the fields on new forms we had created were not long enough for their student names, or for the names of responsible staff members. We thought we had made the fields long enough – our fairly long field names appeared with plenty of room – but we had miscalculated. Using the Sample Data option in Layout mode when the fields were filled with long sample names in Browse mode revealed how we needed to rearrange and lengthen these fields. It was so much easier to do with the sample data visible in Layout! It may be found under View > Show > Sample Data.
I love the hover function introduced in FileMaker Pro v14! Now I can see what any badge is doing for us without having to dig. It includes any relevant script names. Just hover your cursor over the badge and voila. It tells what conditional formatting, what script trigger, what script, you name it.
Resizing Merge Fields
The Position tab of the Inspector allows you to resize merge fields to better fit the data inside rather than the names of fields – this is really great when you have very long field names with very short data and you need to place other elements around it. Select the merge text area and simply change the width of the field. Showing sample data here can help, as well.
FileMaker Inc. released FileMaker Pro and FileMaker Server 15 on May 10th. This is the first release since they announced a new annual release schedule last year, so presumably we’ll see FileMaker 16 approximately a year from now.
FileMaker 15 has a number of interesting new features. I’ve picked out a few features that seem most useful and highlighted them below.
‘In App’ Software Updates
You no longer have to download an updater to keep FileMaker 15 current. The app will simply prompt you to perform the update similar to the way app updates work on an iPhone.
The script workspace now allows multiple levels of undo and redo. This will make it easier to change your mind and undo the last 5 minutes worth scripting changes.
A number of areas in FileMaker have been updated to allow you to work more effectively with 3rd party SSL certificates to enhance the security of your applications.
A new script step enables FileMaker to access iBeacon information in the nearby Bluetooth environment. This could allow your FileMaker app to do all kinds of interesting things based on its proximity to an iBeacon. Examples might include automatically displaying the contents of a container that you are nearby or displaying additional information about a product that you are standing in front of.
This won’t necessarily be useful to all people, but the new Truncate Table script step will be very useful in some situations. In my brief testing, the 'Delete All Records' script step cleared out a table with 117,000 records in 5 minutes and 10 seconds. The new 'Truncate Table' script step did it in 14 seconds.
~ John Newhoff
Portage Bay Solutions is a database development firm based in Seattle, Washington that's been working with organizations of all sizes for over 20 years. Our customer service is top-notch; we answer and return calls promptly, stay within budget, and provide quality support to our clients during all phases of the development process.
- FileMaker Pro & 4th Dimension upgrade and development
- MS Access to FileMaker conversions
- FileMaker Pro & 4th Dimension integration with other data environments
- Web/Database integration
- FileMaker WebDirect