Capturing Button Data in a FileMaker Database

With a FileMaker database, it is possible to capture the JSON data generated by an AT&T LTE-M or AWS Enterprise Button. DB Services already wrote a great blog about using a

custom Lambda to record the JSON into a FileMaker Database from the 1st generation of AWS Buttons here:  With the help of our friends at Tek-Connect, we decided to take it a step further and create a serverless app to make the process of capturing button clicks for these devices in FileMaker as easy as possible.

FileMaker’s ScriptMaker opens up a world of possibilities that customize what happens when pressing these buttons. In earlier blogs, we have demonstrated using Twilio for Text Messaging and Mandrill and MailChimp to send transactional email. You can build workflows using these tools with your FileMaker Solution. Perhaps a client wants their field reps to re-order products from the field using these buttons. With one click, a FileMaker solution can create an order record in a database, send a text to the rep and his customers letting them know the product(s) have been ordered, and send a notification to the warehouse to pick and ship the product. In future blogs, we will be exploring adding more functionality to these buttons.

How to Deploy and Use a Custom Serverless Application to Capture the JSON Button Output

Setting Up The Application

1. Log in to the AWS Console and choose the Lambda service. Once you are on the dashboard, press ‘Create Function’ in the upper right hand corner.


2. On the next screen, choose the AWS Serverless Repository (the last pane on the right).


3. In the search bar, type in “FileMaker” or “Revolution11” in the Public Applications area. Click on the rev11-attiotbutton-filemakerapi application.


4. A Read Me section is found in the middle of the page on the left-side; this provides the parameters necessary to use the application. (A sample FileMaker application can be downloaded with this blog post.) Fill out the parameters for your FileMaker Server, file, and other information on the right-hand side of the screen and press the ‘Deploy’ button.


5. A status screen will appear while the application is being deployed. Once the process finishes, press the Test App button in the upper right of the screen.


6. An overview screen for the app appears. Click on the hyper-linked name of the application (rev11atttiotbuttonfilemakerapi).


7. The next page sets up the function for the buttons. Add the AWS IoT trigger by clicking on it in the list of triggers to the right.


8. The AWS IoT Trigger appears in the workflow now. Scroll down to the configuration triggers area to set up the function to work with buttons.


9. It is possible to use one of the rules created for another button, but in case one has not been created, we will make a new one. Choose Custom IoT rule, give the rule a name and add a query statement as in the screenshot below. Press the save button in the upper right hand corner to save the changes.


10. Let’s test the function! On the top of the screen, find the dropdown to ‘Select a test event’. Since we haven’t created any tests to use, the only choice in the dropdown is to ‘Configure a test event’ — choose this option.


11. Go ahead and use the supplied Hello World template. Give the test event a name and press the Create button at the bottom right of the screen. This test will send the JSON in the body of the test with the function.


12. You will now see the name of the test you created in the dropdown. Press the Test button to the right of the dropdown to run the test.


13. When the test has finished running, you will see the results at the top of the page. In this case it was successful. Now, check your FileMaker Database, there should be a new record with the JSON from the test event.


14. In the event of an unsuccessful test, this same area will tell you what failed. For this screenshot, I have changed the name of the “field” environment variable to a field not in the database. You should see that error in the details.


Configuring the Button

1. Configuring the LTE-M or AWS to use this Lambda function is the same as in past blog posts. In the AWS Server Console, navigate to the one click service and click on ‘Create a project’.


2. Give the project a name and press next.


3. Press ‘Start’ to define a device template.


4. Press ‘All button types’ on the next screen.


5. Enter the Device template name; in the Action dropdown, choose ‘Select a Lambda’ function and choose the function that was just created when you created the application; press ‘Create project’.


6. On the next screen choose Create your first placement – click ‘Create placements’.


7. Give the placement a name and press the choose device button to choose a device to tie to the function.


8. On the next screen, select the device and press ‘Create placement’.


You can now test your button!


You can download a sample FileMaker File to host on your FileMaker Server here.

Download a PDF of this blog: Capturing Button Data in a FileMaker Database

Capturing Button Data in a FileMaker Database

FileMaker Integration with Mandrill

Revolution11 has had great success incorporating Mandrill, a scalable, secure delivery API for sending transactional emails from websites and applications for clients who need to send email from their FileMaker solution. Mandrill is easy to get to know and once established, works well for targeted e-commerce and personalized one-to-one messages. For our discussion we will explain how the Mandrill Sample File constructs the URL to send to the Mandrill API, which then sends the email.

The benefits of sending email via Mandrill can be seen here: Mandrill Features. We were impressed with the simplicity of the process, but wanted to also add attachments to the emails to cover the many times that would come in handy from a business standpoint.

The screenshot shows the basic email form – the user creates a free account at Mandrill, subscribes to a paid MailChimp account (a fairly recent requirement), then uses the Mandrill Sample File to fill out the To/From information and message (seen on the left) and easily add an attachment, if needed. The right side shows the visual output of the custom functions and calculations that are generated at Mandrill.


This blog post from Digital Fusion gives great information on how to construct this file: Sending email from FileMaker using Mandrill. Now, on to the fun stuff with the custom functions needed to add the attachments…

Custom Function: mandrill_createRequestInsertURL

File > Manage > Custom Functions > Edit (to see it).

This function takes in all the parameters (Example: To, From, Subject, API key, etc.) and creates the URL Request.

This function also uses a helper function called escapeData that handles any special characters in the email address, subject, etc.  (Example: &, %, `, etc.)

Custom Function: mandrill_attachmentCodeInsert

This function helps handle attaching the file to the email. Read more about the gritty details here: Sending email from FileMaker using Mandrill 

Now that we’ve used our custom function to create our URL request, it’s time to create the “InsertURL Template.” This is a calculated field that we use to finalize our URL request to the Mandrill API.

File > Manage > Database > Select the “Insert From URL Template” > click on Options (lower right)

As you can see once you’re viewing the calculated field, this uses the mandrill_createRequestInsertURL custom function and creates the URL we send to Mandrill.

To sum up, this is the structure of the URL used to build this function. Inputs from these two field ultimately create the URL to be used.

URL to Mandrill API / Insert From URL Results

URL to Mandrill API is always the same and should be pre-filled into the corresponding field. Insert From URL Results is the result of the custom function, mandrill_createRequestInsertURL and is ultimately a calculated field.

Now that we have our URL, the hard part is done and we just need a simple script to send the email.

sendEmail Script

Now that we have our URL constructed, the sendEmail script is a simple process. The meat and potatoes of this script is FileMaker’s “Insert from URL” function. We just pass in two fields that create this URL. We pass in the “URL to API” which is a constant, and add our calculated “Insert From URL Results” field to the end of the URL, and we’re good to go.


Attach this script to the “Send Email” button and you’re done! We would love to get your feedback on this script and learn how it has worked for you.

Get a PDF of this blog here: FileMaker Mandrill Integration


FileMaker Integration with Mandrill

FileMaker SDK from the Perspective of an iOS Developer


Revolution11 developers were pleased to hear the announcement, made in January 2016, that FileMaker released a set of coding tools, the iOS App SDK, that offer developers the means to build native iPhone and iPad apps. From the perspective of a full-time iOS developer, the FileMaker iOS SDK is super simple. All the work is in the setup for the app. However, it is easy to see how this setup process could be daunting for a non-iOS developer.

The basic steps are:

  • Set up an Apple Developer Account
  • Download and work with Xcode, Apple’s developer environment
  • Create signing identities and certificates
  • Create App ID’s
  • Deal with Provisioning Profiles

Even seasoned developers cringe at the potential headache of certificates and provisioning profiles when setting up a project. However, if you’ve been through this process MANY times, you’ve gone through your rite of passage and dealing with this hassle is no problem.

As a developer, if you’re over this hump, setting up the FileMaker iOS SDK will take you 20 to 30 minutes (if that). Speaking strictly from the iOS side, it’s just setting up your App IDs, certificate (which likely is already setup), and provisioning profile. After that, you just drag and drop the FileMaker solution into the Xcode project and update a config file with the solution filename. Once complete, you just setup an app icon and a launch screen if needed.

If your FileMaker solution was made specifically for mobile device usage, then you might want to go back and adjust your FileMaker solutions layout so that it is optimized for the device. If you import the typical desktop solution, there will be a lot of pinch/zooming going on when the user is using the device. Not the end of the world, but not the best user experience either.

Overall, if you’re experienced in setting up an app project with Apple, the FileMaker iOS SDK will be a breeze for you. The resulting app is native and therefore does not require FileMaker Go, FileMaker’s previous iOS solution, to run. Revolution11 has had great success with setting up client projects using this method – feel free to contact us to talk about the time and cost savings that we have experienced.

Get a PDF of this post here: FileMaker SDK


FileMaker SDK from the Perspective of an iOS Developer

FileMaker Hosting Options

In today’s world, businesses of all sizes are seeking cloud applications to minimize their in-house IT footprint. Currently, FileMaker does not offer a true cloud-based solution. However, it is possible to have your FileMaker solution hosted, but it is important to consider a few options so the hosting company and product you choose will serve your company now and into the future.

Shared Hosting

Shared hosting is the most cost effective way to get started with FileMaker Server. With this option, the service provider hosts your FileMaker solution along with those of other companies. The price of this service usually depends on the number of files that will be hosted and the bandwidth consumed.

Some of the advantages of shared hosting include: low prices ($12.99 and up per month), vendors that manage FileMaker Server and backups for you, and vendors that also manage OS updates and the maintenance of the physical machine.

There are some disadvantages to hosting your files on the same server as others. Because many companies may be sharing the FileMaker Server, the server resources may be consumed by other solutions, degrading the performance for your solution. You are also reliant on the vendor if there are any issues using their self-help utilities to upload a copy of your solution, add changes to the application, and download copies of your solution for development.

Virtual Servers

For this option, the vendor creates and manages virtual OS instances upon which FileMaker Server is installed. Clients purchase their own FileMaker license for the server (some vendors will charge a monthly fee on top of the virtual hosting fee to “rent” the server software to you and install and manage FileMaker server) and install and manage the server and backups themselves.

Virtual Servers are a great way to have more control and better performance for your solution. Your solution is not impacted by the performance of any other FileMaker applications, and you can shut down/restart the server if necessary. Virtual servers are also great if you need to use web-based technologies outside of Web Direct.

Virtual servers are a little pricey, starting at $99 a month. Depending on the vendor you choose, you may also have to purchase, install and administer FileMaker Server yourself. This includes managing backups for your solution.

Dedicated/Co-located Servers

For larger, more intensive FileMaker solutions, you may need a dedicated server. Vendors may “rent” a server, operating system, and FileMaker Server software, or you may be required to provide these and the Vendor will provide a range of services, typically managing the hardware and operating system on the server.

Dedicated servers generally start in the $500 per month range and you will have the additional expense of FileMaker Server, the Operating System, and hardware. Revolution11 recommends that you carefully think about this investment if you purchase hardware or software. FileMaker will eventually have to produce a “true” cloud offering (We have no advance knowledge of such a product, but this is certainly an unstoppable industry trend); unless you can re-purpose the server, you may be very unhappy with the investment.

Get PDF of this post: FileMaker Hosting Options


FileMaker Hosting Options

Integrate Messaging Into Your FileMaker Solution

Real-Life Situation

It’s Friday evening and you notice that one of your field reps has ordered the wrong part. You have limited time to make the correction and ensure that the part gets to the customer on time. No need to panic as you know your enterprise FileMaker solution incorporates SMS or text messaging, as part of its communications strategy and you can easily send a text message to the field rep, clear up the misunderstanding, and get the part on its way.

What if more than one field rep was having the same issue? You could try an email blast, but you know that won’t be effective on a Friday night. You may have an SMS group ready to go and you can send a mass message out to the reps, however the chances of that are slim. You may also need to send out an important file, video or audio message with that SMS and you don’t have time to compose messages one-by-one when you have an urgent situation.

Real-Life Solution

Integrating SMS into your enterprise solution solves these problems and offers a convenient, effective way to communicate with your staff. Chances are that you already have the sales reps cell phone numbers in your system, along with part numbers, brochures, photos and other pertinent business information. Sending any combination of these components out to the field from your system using SMS becomes a powerful tool to manage communication and relay critical information.

One of the important features of using this method is that it works with most carriers and phones, even with Robert, the rep who refuses to replace his flip phone. You also control what happens when replies come back from the outgoing messages; keeping the back and forth communication logged into the SMS provides a record and eliminates the need to open other apps on the phone.

In Conclusion

There is great potential for enterprise SMS solutions as highlighted by the rising popularity of SMS in communicating more effectively with staff, managing delivery receipts, sending alerts from airlines regarding delays and critical updates, tracking inventory and managing stock alerts, just to name a few of the many services that SMS provides to millions of users on a daily basis.

Get PDF of this post: SMS Improves Communication


Integrate Messaging Into Your FileMaker Solution