Property MessageExpression
MessageExpression
Gets or sets an Arcade
Declaration
public ArcadeExpression MessageExpression { get; set; }
Property Value
Type | Description |
---|---|
Arcade |
The Arcade |
Remarks
The expression uses the Arcade language to generate notification information that can be:
- a string literal that is the same for all notifications relating to this Geotrigger.
- information that is specific to the attributes of the fence and objects that met the Geotrigger.
The expression is evaluated whenever the Geotrigger condition is met, in order to
populate the Message property. Display this message to alert
the user that the Geotrigger condition has been met. Note that the expression cannot
be changed when the Geotrigger
For example, with a Fence
"You have " + $fencenotificationtype + " " + $fencefeature.area_name
returns the Message "You have entered Area A"
, where
"area_name" is an attribute field on the Fence
Optionally, the expression can return extra properties in addition to the message. For example, it could produce another string, suitable for logging to a database. To supply additional properties, write an arcade expression that evaluates to a dictionary of key / value pairs:
- A value with the key "message" will be used to populate the Message property.
-
A value with the key "actions" will populate the Geotrigger
Notification actions property.Info -
Any additional key / value pairs are returned in the
Message
Properties dictionary.
For example, this expression results in a Message of:
"Hello world" and a Geotrigger
var action = IIf($fencenotificationtype == 'enter', 'stopTracking', 'startTracking')
return {
'message': 'Hello world',
'actions': [ action ]
}
The Arcade
This property may be null
; if so, notifications sent by the geotrigger will pass a
Geotrigger
For more information on the available profile variables and functions for creating the
Message
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.12 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.12 - 200.6 |
Xamarin.Android | 100.12 - 100.15 |
Xamarin.iOS | 100.12 - 100.15 |
UWP | 100.12 - 200.6 |