Use values returned by the Platform

When the Platform runs one of your functions, it may return a value. Most functions return values that you can use in other expression rules. The Platform can return no more than 100 values from each function.

For example, when the Platform runs the GetMobileLocationN() function, it returns an array of mobile locations that you can use with the DistanceToBoundingGeometry function to determine if an asset is within a certain area.

The following example returns the distance of the current asset from the bounding geometry of its last three locations and determines if the asset is outside the bounding geometry of the previous locations (that is, does the function return a value greater than zero). Either way, it writes the appropriate message to the Audit Log:

If DistanceToBoundingGeometry(GetMobileLocationN(3), location) > 0

Then Audit("data-management", "Asset is outside Bounding Geometry")

Else Audit("data-management", "Asset is within Bounding Geometry")