Software tips, techniques, and news.

By Aaron Kaiser  Posted on  May 20th, 2020  in  Free Downloads, Claris FileMaker

FileMaker Machine Learning Using CoreML

Machine learning and artificial intelligence are rushing in the next era of computing by enabling machines to make decisions, rather than humans telling machines which decisions to make. Whether you need to classify objects in an image, parse speech into text, or get recommendations on what products to market next quarter, machine learning can be adopted to assist. Leveraging FileMaker’s machine learning capabilities on MacOS makes integrating artificial intelligence into your business easier than ever.

Models 0x101

A predictive machine learning algorithm relies on a model—a set of black box functions that generate an expected output set based on an unknown input set. The model is created using a collection of training data with known inputs and outputs.

For example, to create a model that identifies different types of dog breeds, you would train the model using a collection of photos for each dog breed. Once created, giving the model an image of any type of dog breed that was included in the training data would produce an output identifying the image’s breed.

The first step in using machine learning in your FileMaker system is to either create or use an existing model. Apple provides a handful of CoreML models for image and text recognition. CoreML is Apple’s library that optimizes performance of on-device machine learning processes. Executing machine learning tasks on-device, as opposed to integrating with an online API, improves responsiveness and privacy.

Models, No Assembly Required

Create Machine Learning Project

Apple also provides Create ML—an Xcode tool that makes creating a CoreML model effortless, with no code required. Once a model has been created using Create ML, getting it up and running with your FileMaker database takes only minutes.

The Create ML tool can be started by opening Xcode and then selecting Xcode>Open Developer Tool>Create ML from the menu bar. Select New Document from the dialogue and then you’ll be asked to choose a template. For this demo, we’re choosing to work with an image classifier, but Create ML provides options for sound, motion, text, and data analysis as well.

After selecting Image Classifier, give a name to your new project and click Next. Choose a location to save your project and once the project window is open, you’re ready to begin training your model.

If You Give A Model An Image

Create Machine Learning Training Complete

Next up, you’ll need to supply the model with a set of images for the training and testing processes. This demo will be creating a model to identify objects in the Caltech 101 dataset. You can download the image dataset yourself by visiting the Caltech 101 website. Included with the sample file is a model created using Create ML and this collection of images.

With Create ML open, we select the 101_ObjectCategories folder for the Training Data section. This folder contains subfolders that each have a set of images to train the model. To begin the training, click the Begin Training button at the top of the screen. Once the training is complete, Create ML will produce a .mlmodel file that can be used in FileMaker.

Loading The Model In FileMaker

In usual FileMaker fashion, incorporating the model into your system is effortless—just drop it into a container field. Since this demo is using an image classification model, there’s also a container to hold the image to classify. Putting the model to use requires only a couple of script steps. The first script step sets the stage for loading the model into memory.

Configure Machine Learning Model [ Operation: <operation> ; Name: <modelName> ;  From: <modelContainerField> ]

The first parameter specifies the operation, which can be either vision, general, or unload. Vision is used for image inputs and general is used for scalar input values. Unload frees the named model from memory. The second parameter specifies a name, which is used to reference the model in subsequent script steps. The last parameter specifies a container field from which to load the model.

Compute The Model

After the model is loaded, the next step is to use the ComputeModel function. This returns a result from processing the given input. There is a slight variation in this function based on which type of model is being used.


ComputeModel ( <modelName> ; "image" ; <value1> {;"confidenceLowerLimit" ; <value2> ; "returnAtLeastOne" ; <value3>} )


ComputeModel ( <modelName> ; <name1> ; <value1> {;<name2>; <value2>;...<nameN>; <valueN>} )

For vision models, value1 is the input image container. To limit the results returned, confidenceLowerLimit can optionally be specified between 0.0 and 1.0. The results will be limited to classifications that have a confidence level above the specified value. The returnAtLeastOne parameter is used in conjunction with the optional confidenceLowerLimit parameter. If no results are returned with a higher confidence level than the specified limit and returnAtLeastOne is true, the first result will be returned. This technique can be used to always return only the first classification in the list by specifying a limit of 1.0.

General models are similar but require the parameter name of the model as defined by the creator. They do not include the confidenceLowerLimit or returnAtLeastOne parameters. Multiple parameter-value pairs can be specified as needed.

Unload The Model

After using the model, it’s important to free the memory resources required to compute the output. The Configure Machine Learning Model script step supplied with the name of the model to unload is used.

Configure Machine Learning Model [ Name: <modelName> ; Operation: Unload ]

After the model is unloaded, you can continue with your script as needed.


Leveraging FileMaker’s machine learning capabilities will speed up time consuming tasks such as classifying images and transcribing speech; moreover, it can help with data analysis by providing predictive insights based on your existing data. Contact us today for assisting in adding machine learning to your FileMaker system!

Did you know we are an authorized reseller for Claris FileMaker Licensing?
Contact us to discuss upgrading your Claris FileMaker software.

Download the FileMaker Machine Learning Using CoreML File
Please complete the form below to download your FREE FileMaker file.
FileMaker Experience *
Terms of Use *
OPT-IN: I agree that I am downloading a completely free FileMaker application file with no strings attached. This file is unlocked, and I may use it for my business or organization as I see fit. Because I am downloading a free file, I agree that I should receive occasional marketing. I understand that I can OPT-OUT of these emails at anytime.
Aaron Kaiser thumbnail
Aaron Kaiser

Aaron is a certified FileMaker and web developer who approaches solutions to problems from a logical standpoint and puts a high priority on the accuracy of his work.

FileMaker 18 Certified Developer
FileMaker 17 Certified Developer
FileMaker 16 Certified Developer
FileMaker 15 Certified Developer
FileMaker 14 Certified Developer
FileMaker 13 Certified Developer
FileMaker 12 Certified Developer
FileMaker 11 Certified Developer
"We were actually able to add more features than we thought would be possible within our budget. We always experienced a ‘can do’ attitude and DB Services was incredibly patient and easy to work with."
Courtney Hartman
Art Director
"The new FileMaker custom website interface is very user-friendly and easy to follow for our clients. In addition, it is much faster than the old Instant Web Publishing (IWP) interface. Thank you and all the others who have helped us out at DB Services. I am very grateful for the excellent service you provide us. Its nice to know we can call you for help if we have an issue."
Wayne Capek
"We needed a solution that would simplify the administration of our responsibilities under our contract with the State of Indiana. We have seen a dramatic increase across the state in the number of potential foster and adoptive parents that have begun the preparation and training process. This increase has resulted in a significant opportunity for children available for adoption. That’s a big win for everyone! And it’s all because we can refer potential parents to the proper state contacts efficiently and quickly."
Chris Morrison
Executive Director
"Thank you for all of your expertise and valuable help. I am so grateful to have found DB Services."
Linda Findlay
"Thank you for our new database system. We transitioned from a carbon copy paper based system to a digital database. The software has saved us time and money. We used to archive all our jobs in cabinets, now we can look up a job in seconds from anywhere. The software allows us to easily email estimates to our customers in pdf format. In a year there was a return on investment just from eliminating the purchasing of our carbon forms."
Todd Cartmel
"The new system allows us to create and track jobs for customers along with inventory, something we had been doing with separate word and spreadsheet files. Because it’s now so intuitive, new staff members are able to begin using the database immediately without our usual training session and ‘cheat sheets’ for getting around within the file."
Tom Andrews