Add-ons in Claris FileMaker originated in version 17 with easy access to include useful modules into a custom application. With version 19, we now can create our own add-ons. This adds a great deal of functionality by removing the need to create regularly built modules from the ground up. Many companies have created resources about add-ons as well as creating their own modules. The process of creating an add-on may not be too difficult, but there are things to consider when creating one.
Creating an add-on is a similar process to creating a regular FileMaker file with some specific elements needed for it to work. The name of the file to create the add-on will be the name of the add-on. One of the required elements is a named layout “__FMAddonTemplateDirectives_en”, which the “en” part of the name comes from the ISO 639.1 language code that stands for the English language. Another required element is that on the layout there needs to be a group of objects. By grouping, it means that individual objects are set together so when moving them around they all move at the same time. The group does not need a special name and there can only be one group on the layout. To make a group for a single object, first create two objects, then group them together, and finally delete the new object that isn’t needed; the remaining object will still be in a group. There are other options to the file that can be added and changed such as join relationships, a custom logo, and themes, but those two elements with the layout name and group are required.
There are many different properties and elements of the add-on file that can be changed that will be included in the add-on. Some of these things are the scripts, themes, custom functions, tables, and relationships between tables in the relationships graph. This is to help ensure that everything that is needed for the grouped object on the specific add-on layout does not have anything missing to function in another file. To be able to use the same add-on, multiple times in a file, then the name must include ”[<^FMXML_AddonInstanceUUID>]” to make sure things don’t get overwritten or overlapped. This applies to the names of many elements including but not limited to objects, field calculations, and script parameters.
Now, once everything in the file is in place, then the add-on can be created and then added to other files. This requires the use of the script step called “Save a Copy as Add-on Package”. The script with this step can be in the same file and will run to create the add-on, however, that script will carry over into the add-on. The way to get around this is by running the script step in the other file that refers to the window in the add-on, which both of the files need to be open at that point. In the script step, along with the Window Name, there is the option of whether to replace UUIDs or not. This is highly recommended to be turned on if using the same file to create different add-ons. After the script is run the add is created and a folder window will open up to show where it has been created, which will be in the “AddonModules” folder under the FileMaker application in its own folder with the name of the file. It consists of many text files including json and xml. The json files that are similarly called “info_en.json” (“en” being the language code which will be different for each language) will need to be opened and edited to add information that is shown when installing the add-on into a file. After editing those files, restart the FileMaker application to be able to use the add-on. To install the add-on in a file, go into layout mode, then into the objects pane, and under the “Add-ons” tab at the bottom left there is a +plus sign. From there, the list add-ons are shown and then are installed when chosen. The installed add-on can then be dragged onto the layout to be included in the file.
When installing or uninstalling add-ons into a file, different effects happen depending on each add-on. If there are existing elements with the same name, it will create the new element with a “2” beside it for certain kinds of elements. (Ex. a file with a Contacts table has the add-on that also includes a Contacts table, will name the new table as “Contacts 2”, but there will be two themes that have the same name.) The names of the different parts of the add-on can be changed, and it still keeps track of it being connected to the add-on. For uninstalling an add-on, I would be very cautious in doing that, because it will remove connects elements and it may remove things that are not desired to be deleted, such as certain CSS attributes or tables with information in them. However, to uninstall an add-on, right–click or ctrl/cmd–click the add in the objects pane and choose “Uninstall Add-on”. (Not be confused with adding or deleting the add-on on a layout.)
In summary, we can see that the initial setup does not have to be more complicated than developing a regular file but there are many options and considerations to think about. There is a lot more detail that can be covered in explaining more about each option. A lot can be packed into an add-on so it does save time in adding modules compared to re-creating things (or even copying and pasting). Those things can be customized when added to the file, so that works better than uninstalling and re-installing. So I would recommend at least trying it out, because after that you may see the potential power they can have in your applications.
More information about add-ons and potential bugs can be found here: