Location Namespace

The 'location' is the current location of the asset for which the rule was generated. If the message that causes the rule to run is a MobileLocation trigger, you can use the unqualified symbol name location to obtain the current posted location value as the MobileLocation object. For all other triggers you need to use the fully-qualified name including the namespace Location, for example, Location.location.

Note:  When used with an Event trigger, the "location" refers to the last reported location of the asset.  This may not be the "current" location.

Use this namespace with asset-related triggers and NOT with system-related triggers. See Using Appropriate Actions and Namespaces with Triggers for Expression Rules.

The Location namespace does not take any local variables. It does take the following symbols:

Notice that the namespace always starts with a capital letter while the symbol always starts with a lowercase letter.

Tip:

The location is always resolved as a data item first before it is tried as a real location. This sequence allows you to have a location data item. To reference the actual location, you must use the namespace: Location.location. For best practices, use the namespace and symbol for the data item as well (DataItem.location.value).

 

See Also