Reference > Script steps reference > Control script steps > Configure Region Monitor Script
 

Configure Region Monitor Script

Configures a specified script to run when an iOS device enters or exits a specified region.

See also 

Options 

Monitor specifies whether the monitored region is defined by an iBeacon or a geofence. Use the Clear option to stop monitoring a region.

Name specifies a name for the monitor. You must specify a unique name for each monitor, whether the region is defined by a geofence or an iBeacon. If you specify the name of an existing monitor, the existing monitor is canceled, and a new monitor with the same name is configured.

Script specifies the script that will run when an iOS device enters or exits the monitored region.

Optional script parameter specifies a script parameter for the script.

The following options are used only for iBeacons:

UUID specifies the universally unique identifier for iBeacons to monitor. The UUID identifies one or more iBeacons as a specific type or from a specific organization. For example, iBeacons for all branches of a department store could share the same UUID.

Major (optional) specifies the value identifying a group of iBeacons. For example, all iBeacons in a specific branch of a department store could share the same major value. The major value must be between 0 and 65535.

Minor (optional) specifies the value identifying specific iBeacons within a group of iBeacons. For example, all iBeacons in the toys section of a specific branch of a department store could share the same minor value. The minor value must be between 0 and 65535.

The following options are used only for geofence:

Latitude specifies the latitude for the region to monitor.

Longitude specifies the longitude for the region to monitor.

Radius specifies the radius (in meters) for the region to monitor. The value must be greater than zero and less than the maximum value defined by the device and the iOS version.

Compatibility 

 

Product 

Supported 

FileMaker Pro Advanced 

No 

FileMaker Go 

Yes 

FileMaker WebDirect 

No 

FileMaker Server 

No 

FileMaker Cloud 

No 

FileMaker Data API 

No 

Custom Web Publishing 

No 

Runtime solution 

No 

Originated in 

FileMaker Pro 16.0

Description 

Use this script step to run a specified script when an iOS device enters or exits a region. The region can be defined by an iBeacon or a geofence. For example, you can use iBeacons in different galleries at a museum, then configure different scripts to provide supplementary audio or video content as visitors approach each gallery.

To stop monitoring a region, use the Clear option and specify the name of the monitor to stop. If there are no region monitor names specified to clear, all active region monitors are stopped.

Each time a device enters or exits the defined region, iOS notifies FileMaker Go. To determine whether a device entered or exited a region, use the Get(RegionMonitorEvents) function in the script run by the region monitor.

Notes 

You can monitor up to 20 regions at a time.

If the value for any of the required options is missing, the script will not be configured.

Each region monitor is associated with the window that is displayed when the specified script runs. Closing a window clears all configured monitors for that window.

If the specified value for latitude is outside the range of -90 to 90, the returned value is latitude - i*90, where i is the quotient of latitude divided by 90. The returned value has the same sign as latitude, and the absolute value is less than 90.

If the specified value for longitude is outside the range of -180 to 180, the returned value is longitude - i*180, where i is the quotient of longitude divided by 180. The returned value has the same sign as longitude, and the absolute value is less than 180.

If this script step is not configured correctly, FileMaker Go displays an error. Use the Get(LastExternalErrorDetail) function for information about any errors you receive.

Example 1 

Runs the PopArtVideo script when an iOS device enters or exits the range of the specified iBeacon in the Pop Art gallery.

Configure Region Monitor Script [Monitor: iBeacon; Name: MonitorName; Script: "PopArtVideo"; UUID: "BA37611E-FB73-4FFD-8FD3-63459D3FF280"; Major: 10; Minor: 1]

Related topics 

Get(RegionMonitorEvents) function

RangeBeacons function

Script steps reference (alphabetical list)

Script steps reference (category list)