Get(RegionMonitorEvents)
Returns events that caused the script specified in the Configure Region Monitor Script script step to run.
Format
Get ( RegionMonitorEvents )
Parameters
None
Data type returned
text
Originated in version
16.0
Description
If an event causes the script specified in the Configure Region Monitor Script script step to run, this function returns:
- the name of the region monitor
- the timestamp when the iOS or iPadOS device entered or exited the monitored region
The timestamp is formatted based on the settings for the custom app, using either the locale that the custom app was created in or the system locale.
- 1 if the device entered the monitored region; otherwise it returns 0
The events for each monitor are displayed in chronological order, starting with the earliest event, in the following format:
<region name>
<timestamp>; <1 or 0>
<timestamp>; <1 or 0>
<timestamp>; <1 or 0>
Notes
- If a user entered or exited a monitored region while FileMaker Go was suspended, notifications are delivered after FileMaker Go returns to the foreground. This may cause the Get(RegionMonitorEvents) function to return multiple values.
Example 1
In the following example, a custom app uses the Configure Region Monitor Script script step to monitor a region for iBeacons. The name of the monitor is BeaconMonitor. The script uses a dialog box to display information about devices entering or exiting the monitored region.
Show Custom Dialog ["New device detected" ; Get(RegionMonitorEvents)]
In this example, the custom app was created with a German locale, and FileMaker Go is using the system settings. The dialog box displays the following information if an iOS or iPadOS device entered the region at 10:45 AM on January 27, 2019, and exited a few hours later.
BeaconMonitor
27/1/2019 10:45 AM;1
27/1/2019 1:26 PM;0