PK Information | Software & Business Consulting

View Original

FM19 Exciting Features

Changing FileMaker, one add-on at a time

Claris recently released FileMaker 19, and with a new logo comes an entirely new way to approach FileMaker development. The days of laboring over API integrations and scouring the internet for clever UI tricks may be fading into the past. Now with the advent of add-ons and improved JavaScript (JS) integration, the next feature you add to your FileMaker (FM) solution may just be a few clicks away.

In their journey of pursuing upgrades and improvements to their platform FileMaker, Claris has come up with a powerful combination of new features that will help bring the flexibility and capability of web apps into the world of FileMaker. The additions in FM19 make it simple enough for even FM beginners to start integrating JS apps. If you have already taken the JavaScript plunge, then you will be excited to see how your life will be simplified. If you haven’t, then it’s best to get on board now or risk being left behind.

FileMaker Add-Ons

Add-ons are truly the ground-breaking change of this new version. Now, adding powerful new widgets to your solution is almost effortless. With the latest version of FileMaker 19.1.2, Claris has included add-ons for several useful widgets such as activity timelines, barcode generators, calendars, calendar heatmaps, kanban boards, photo galleries, rich text editors, charts, and timers.

I was surprised at just how simple add-ons were to include: it took me less than 15 minutes to add a fully-functioning calendar to my solution. As the Claris marketplace begins to fill up with all sorts of add-ons, we will likely see companies pursuing FileMaker developers who are skilled at quickly integrating a variety of add-ons and web apps.

With the ability to use add-ons also comes the ability to create add-ons. Do you have some pieces of UI or even entire layouts that you seem to be constantly replicating in different solutions? Now you can just make an add-on and then drag-and-drop it wherever you want it. Best of all, you can share your ingenious designs with the rest of the FileMaker community! 

While there could be some concern that these add-ons would lower the barrier of entry to the point that clients don’t need developers anymore, I believe that the integration of add-ons to a working FileMaker solution is still beyond the skill of normal FileMaker users or even most super-users (although they may certainly be tempted to try!). Nevertheless, it will be vital for developers to become proficient at using add-ons in order to stay relevant. All things being considered, simplifying development benefits both developers and clients by helping to keep the focus on innovation rather than having to constantly reinvent the wheel.

Improved JavaScript Integration

FileMaker 19 comes with two JavaScript-related updates (three if you are on v19.1.2) that enhance the capabilities of web apps in FileMaker. These updates provide the foundation for new JavaScript apps to be built as add-ons.

1. Perform JavaScript in Web Viewer [ <webViewerName> ; <javascriptFunctionName> ]

This new FileMaker script-step allows you to call and pass parameters to a JavaScript function that you have defined in a web viewer. Now you can store libraries of code in a web viewer and call the JS functions at will in your FileMaker scripting.

2. FileMaker.PerformScript ( <scriptName> , <optionalParameter> )

When running JavaScript in a web viewer, FileMaker creates a “FileMaker” object that can be used to call FileMaker scripts from the currently executing JavaScript function. Data can also be passed to the FileMaker script, which means that you can update FileMaker data with what is happening in your JS app. This closes the loop between FileMaker and your JS app, allowing two-way communication.

3. FileMaker.PerformScriptWithOption ( <scriptName>, <parameter>, <option> )

Newly released in v19.1.2, this JavaScript function acts similarly to “FileMaker.PerformScript” but also allows you to pass an option that allows you to control how FileMaker handles multiple scripts being called sequentially (i.e. whether each call interrupts the currently running script or uses a queue). Please see the release notes for more information.

To see some of the possibilities, here is some sample code that allows users to generate heavily formatted Excel files from FileMaker data using the exceljs npm package.

function downloadButton(data, colorCoding) {
var wb = new ExcelJS.Workbook();
buildExcel(wb, data, colorCoding);
base64String = btoa(String.fromCharCode.apply(null, new Uint8Array(wb)));
FileMaker.PerformScript("Vehicle | Save Excel File", base64String); 
}

I created a downloadButton function that was tied to a button click in my JS app. By using just a few lines of JavaScript to leverage a code library, I was able to programmatically generate an Excel file as base64-encoded text and then pass that data to the FileMaker script below to be saved to a file.

This ability to link JavaScript to FileMaker solutions multiplies our capabilities as developers and opens whole new ways to boost our clients’ effectiveness.

Execute FileMaker Data API

FileMaker 19 includes a new script step that allows developers to take advantage of the Data API engine from a FileMaker script. The engine will follow the same rules as if you had called it from an HTTP request, but the required input is much simpler since you are referencing the file you are in. In fact, you only need to specify the layout to pull the data from and the maximum number of records to return.

An example of the returned data is given below.

{
"response": {
"dataInfo": {
"database": "testDB",
"layout": "Timesheet - Detail",
"table": "TIMESHEET",
"totalRecordCount": 1,
"foundCount": 1,
"returnedCount": 1
},
"data": [
{
"fieldData": {
 ...data...
},
"portalData": {
"testPortal": [
{
...data...
}
]
},
"recordId": "1",
 "modId": "1",
"portalDataInfo": [
{
...data...
}
]
}
]
},
"messages": [
{
"code": "0",
"message": "OK"
}
]
}

It may not be obvious at first, but this feature is quite useful for JavaScript apps in your FileMaker solution. Because the Data API was designed to interact with web APIs, it receives requests and returns data in JSON. Most JS apps expect to receive data in JSON format, so now you can simply run the Execute Data API script step, parse the JSON if necessary, and then send it to your JS app.

This is mostly a developer nicety. However, these improvements can help lower the barrier of entry for many developers who are interested in web apps, but find that there is just too much complexity to make it worthwhile to learn. It is important to note that this will not count against Data API usage so there is no real drawback to using it.

FileMaker Server for Linux

While this is technically just a developer preview and not ready for a production environment, the concept of being able to run FMS on Linux is a highly appealing one. Licensing cost for Windows servers can be quite large, so being able to use a free, open-source OS like Linux could be a huge financial benefit for many clients. While some companies already have their infrastructure built around a Microsoft environment, the flexibility, stability, and low (or no) cost of Linux servers could be appealing to many others.

Having this capability will make FileMaker more marketable towards smaller potential clients who don’t have the money to spend on extra licensing costs, as well as those who have already invested in a Linux environment. However, since FileMaker hasn’t released the full version yet, we will have to wait and see what the full impact will be.

Wrapping It Up

Now that you’ve seen some of the highlights of FileMaker 19, I suggest that you explore them for yourself to see what changes could benefit your clients. Also, breeze through the marketplace to see what other developers have been working on. You might find solutions to some problems you’ve seen in the past, and you might even be inspired to make some add-ons of your own!

Here at PK Information, we care about stability for our clients and encourage caution when upgrading FileMaker versions. While new features are exciting, client stability is certainly far more important. Generally, we recommend waiting to upgrade to the newest install of FileMaker once it has proven to be stable in a production-level environment. Sometimes it can take a few months for the initial bugs to be addressed, so be patient and remember to stress-test each version yourself.


PK Information is a FileMaker-certified development agency serving the Tampa Bay, Miami Lakes, and Knoxville regions. We believe that great software can change everything. Is your database running on unsupported versions of FileMaker? Contact us today!

SUBSCRIBE

Sign up with your email address to receive future posts like this directly to your inbox.

See this form in the original post