FileMaker and Add-Ons

One of the most revolutionary updates in FileMaker 19 is the ability to install add-ons to your database. These add-ons give FileMaker developers the ability to simply drag and drop new features into their solutions without writing a single line of code. But what is an add-on? And how do they integrate with existing FileMaker files? 

An add-on is a collection of pre-built FileMaker layouts, script and tables, that can be dragged and dropped into your solution. There are two key parts to this definition: pre-built, and drag-and-drop.

The pre-built part of the add-on means that most of the heavy lifting needed to create a new feature is already done. All you need to do is install and add on and all the scripts, layouts, and tables you need will already be there. When you install an add-on, the table occurrences, scripts, and layouts are added to your database file.

 
1.png
 

Relationship graph before installing an add-on.

2.png

Relationship graph after installing an add-on.

There are two different ways to install an add-on. For FileMaker created layouts, you can install an add-on by going into layout mode and clicking on the plus button. Here you will get a list of all the add-ons included with FileMaker. You need FileMaker 19 to install and drag and drop add-ons, but once they are added they can be used by older versions. 

You can also get add-ons from 3rd parties on the Claris Marketplace. These will be downloaded as a zip file that must be unzipped and added to your (the developer) FileMaker app. The file location to place the add-on is:

Mac: /Users/username/Library/Application Support/FileMaker/Extensions/AddonModules
PC: Users\username\AppData\Local\FileMaker\Extensions\AddonModules

The other part of an add-on is the drag-and-drop feature. While an add-on can include an unlimited amount of scripts, layouts, and tables, you only interact with those backend pieces through a collection of layout objects that are dragged from the add-on to a layout in your solution. When you drag an add-on onto a layout, FileMaker will make any relationships needed between the table occurrence of the layout and the table occurrences of the add-on. While an add-on only needs to be installed once to your solution, add-ons can be dragged to multiple different areas in your file. So, if you have an images add-on, you can link this add-on to any layout in your database to display images related to events, customers, inventory, or any other table. 

3.png

Relationship graph before dragging the add-on onto a layout based on the meetings table occurrence.

4.png

Relationship graph after dragging the add-on onto a layout based on the meetings table occurrence.

Depending on how the add-on was built, you might be able to change which event table is being referenced. There are two main types of add-ons in FileMaker 19, table based, or JavaScript-based. JavaScript based add-ons rely on a WebViewer to render the drag and drop part of the add-on. They use FileMaker tables and scripting to interact with the JavaScript in the WebViewer, but the user interface is JavaScript. The JavaScript-based add-ons included with FileMaker 19.2 have configuration windows where you can specify which tables you want the add-on to reference. This makes customizing the add-on and integrating it into your solution very simple. JavaScript add-ons are not required to have a configuration window. This is just how FileMaker set up their add-ons and we can hope this becomes the industry standard as the FileMaker community starts creating and sharing their add-ons.

Other than the settings in the configuration window, JavaScript-based add-ons can’t be modified in a meaningful way. Editing them would mean changing the HTML and JavaScript code used to render the WebViewer. While this can be done, it requires a certain level of web coding knowledge. You can think of JavaScript-based add-ons as black boxes. They are fully functional as is, and you don’t need to worry about what is going on behind the scenes. 

The other type of add-on is table based. Instead of using a web viewer to render file information, table based add-ons will use FileMaker objects such as portals, fields, buttons, etc. grouped together to create an add on. With these types of add-ons, the objects in the drag and drop part of the add-on can be edited just like you would edit any other FileMaker layout objects. These types of add-ons will include brand new tables that are referenced in the add-on. So if you have an events table and want to add a calendar add-on, the calendar will reference the event table included in the add-on instead of the event table that already exists in your database.

These two types of add-ons are strictly followed in the FileMaker created add-ons, and are even separated into table and JavaScript categories. However, community created add-ons are not going to be completely table or JavaScript based and will likely be a combination of the two. To customize these add-ons and integrate them into your solution will take varying levels of effort, it all depends on how the add-on is built. 

The use case for add-ons in one sense is unlimited because add-ons can be anything and everything. How the add-ons are used in your solution depends on the type of add-on. 

Table based add-ons (like the name implies) are table based and should be used for brand new features. Because the front facing part of the add-on is the drag and drop section, it is tempting to view add-ons as nice prebuilt UI pieces that can be used to create layouts. However, the power of table based add-ons are not in the drag and drop portion, but the backend structure and scripting you get from installing the add-on. 

For example, if you want to add a stripe payment processor to your database, instead of building it from scratch you can install a payment add-on. The only part of the add-on that you see could be fields to enter an amount and credit card information, and a ‘charge now’ button. However, in the backend the add-on would connect to stripe, charge the credit card for the correct amount, and show you the result. This would take weeks of development to build from scratch, but with an add-on, if you have done it once (or if anyone in the FileMaker community has done it once) you just re-use that bit of work again. 

Table based add-ons are great for new development, but they don’t really integrate with existing tables. If you already have a payment table in your database, the stripe add-on will reference the brand new payment table included in the add-on and not the payment table you already have. For this reason, table based add-ons should only be used for new development, and are not practical ways to add functions to existing tables.

Table based add-ons do have some additional requirements to work in your file. Not all table based add-ons build new relationships as they are placed, but many of them do. The ones that are relational need to know what the primary key of your table is. Currently, the only way FileMaker can determine the primary key is if you use the PrimaryKey field generated by FileMaker when the table was created. The field can be renamed, but it must be this field. This means table based add-ons will not integrate with any table made before the default fields update in FileMaker 17. 

In addition, table based add-ons all link to the same table occurrence when they are placed in more than one area of the database. So, if you add a people add-on to meetings, and then add the same people add-on to companies, companies and meetings are now linked together in the relationship graph via people. 

5.png

The real power of add-ons reveal themselves when they are combined with the other big update in FileMaker 19, native web development. The JavaScript based add-ons built by FileMaker include configuration tabs that can be used to select which table to reference when pulling in the data used in the WebViewer. These add-ons focus on UI elements that would be difficult or even impossible to build with vanilla FileMaker and give you the power of web development without needing to put in all the work to build the features. Kanban boards, calendars, beautiful dynamic charts, and more are all there for you to use without writing a single line of code. 

JavaScript add-ons will add tables, scripts, and layouts to your database, just like table based add-ons, but this backend structure is really only there to store the web-code used to render the drag and drop part of the add-on. These types of add-ons do not add relationships to your database when they are placed because they are entirely self contained. With JavaScript add-ons the functionality of the add-on is entirely in the drag and drop portion of the add-on, and in the customizable configuration tab that allows you to tell the JavaScript exactly how to display your data.                             

Add-ons are an incredibly powerful and potentially game changing tool to FileMaker. JavaScript add-ons can be used to add the power of web development to your solution without the need to learn a whole new language. And table based add-ons allow you to easily add large processes and integrations to your database.  In a future blog post we will discuss how you can create your own add-ons that you can use internally, or upload to the marketplace. 


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. Do you need an experienced development team to help modernize your database? Contact us today!

SUBSCRIBE

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