Software tips, techniques, and news.
Have you ever wanted your FileMaker Go app to send messages when a tech arrives onsite for a service request, or to notify management when that very same tech leaves? How about to guide potential customers at a show to the booths they would be interested in? With FileMaker 16, you can have your FileMaker Go app automatically perform actions based on the user's location. This is made possible by two new features: a new script step named "Configure Region Monitor Script" and a new function named "Get ( RegionMonitorEvents )"
Below is how you can set up and use these new features in your solutions.
The first step is to set up the regions that we want to monitor and track the resulting actions when a user enters or exits the specified regions. The Configure Region Monitor Script script step allows FileMaker to monitor up to 20 regions at a time.
Let's look at options you need to specify when using this script step.
The geofence option utilizes GPS to locate iOS devices. It can monitor locations in a much larger area but tends to be less accurate, making it a great choice for outdoor use.
Visually, think about a geofence region as something like this:
The latitude and longitude will mark the center of the circle, whereas the radius will set the size of the circle.
The iBeacon option uses a bluetooth low energy (BLE) signal to communicate with beacons (iBeacon devices) around you, monitoring your location. They have high accuracy but relatively small coverage compared to Geofence, making it very useful for indoor use.
It's important to note that values specified in the script parameter will be evaluated when the specified script runs, not when the region is configured. If you want to pass data from fields as parameters, keep in mind it will be the values on the current record when the script runs, not those when the region was first configured.
Also, similar to the OnTimer trigger, regions configured are tied to the window in display when the specified script runs. So if this window is closed, all configured monitors will be cleared out.
Now that we have our monitored regions configured, the attached scripts will run whenever the user enters or exits the area. But how do we know if the user is entering or leaving a region, and what if we want different actions for each? The Get ( RegionMonitorEvents ) function will help with that.
In the script that you set the Configure Region Monitor Script step, you can use Get ( RegionMonitorEvents ) function to return the action that caused this script to run. This will list all the events associated with that region in chronological order in the following format:
<timestamp>;<1 or 0>
<timestamp>;<1 or 0>
<timestamp>;<1 or 0>
1 means the iOS devices entered the monitored region, and 0 means it has left it.
For example, if I entered a region named "Job site 1" at 9:00 am on March 31st 2017, this function will return:
Job site 13/31/2017 9:00:00 AM;1
If I left the site at 5:00 pm the same day, the function will return:
Job site 13/31/2017 9:00:00 AM;13/31/2017 5:00:00 PM;0
Using this, we can tell whether the user is entering or exiting the named region and have the script perform differently as needed.
Since iBeacon and geofence offer different coverage and accuracy, let's look at which option is more suitable for certain use cases.
FileMaker 16 has introduced new location monitoring features that truly give FileMaker Go the edge by enhancing your app’s ability to take on any location-specific needs. Whether you’re indoors, outdoors, coming, or going, FileMaker can monitor it all.
Did you know we are an authorized reseller for FileMaker Licensing?
Contact us to discuss upgrading your FileMaker software.
Ethan is a hard-working, focused application developer who employs his expertise in database and interface design to produce creative outcomes for clients. His steady demeanor, receptiveness to new ideas, and willingness to help is a recipe for success in working with both colleagues and customers.