Show / Hide Table of Contents

Enum ArcadeExpressionReturnType

The expected type of the result calculated by an expression described within an ArcadeExpression

Namespace: Esri.ArcGISRuntime
Assembly: Esri.ArcGISRuntime.dll
Syntax
public enum ArcadeExpressionReturnType

Fields

Name Description
Any

The return type is expected to be any of the other ArcadeExpressionReturnType types. 'Any' implies that the application evaluating the expression will need to check the result for its type and use the value appropriately.

Automatic

The return type of the expression will be automatically determined based on the script calculation.

The return type is determined by the return value of the script. Different paths through the script might result in different result types. For example, depending on input values, it might return a number, a string, a date or an array.

Boolean

The return type is expected to be a boolean value of true or false.

Arcade will convert the return type to a boolean via the following transformations:

  • booleans are returned unchanged.
  • numbers are true if not equal to 0 or NaN, false otherwise.
  • strings are true if a lower-case comparison is equal to 'true', false otherwise.
  • all other types are false.
Date

The return type is expected to be a DateTime value.

Arcade converts the return type to a DateTime via the following transformations:

  • DateTime objects are returned unchanged.
  • DateOnly objects are converted by assuming the time is midnight.
  • DateTimeOffset objects are converted to match local time.
  • strings are parsed if they match the ISO 8601 format, YYYY-MM-DDTHH:MM:SS.
  • all other types are converted to null.
DateOnly

The return type is expected to be a DateOnly value.

Arcade converts the return type to a DateOnly via the following transformations:

  • DateOnly objects are returned unchanged.
  • DateTime objects are converted by removing their time component.
  • DateTimeOffset objects are converted by removing their time component and offset.
  • strings are parsed if they match the ISO 8601 format, YYYY-MM-DD.
  • all other types are converted to null.
Dictionary

The return type is expected to be a dictionary of key/value pairs.

Arcade will convert the return type to a dictionary of key/value pairs via the following transformations:

  • dictionaries are returned unchanged.
  • all other types are converted to null.
Number

The return type is expected to be a floating-point number.

Arcade will convert the return type to a double via the following transformations:

  • booleans return 1 if true, 0 otherwise.
  • integral types are converted to double. This may be a narrowing conversion.
  • double values are returned unchanged.
  • null is converted to 0.
  • strings are parsed as double.
  • all other types are converted to NaN.
String

The return type is expected to be a string.

Arcade will convert the return type to a string via the Arcade Text() function.

TimeOnly

The return type is expected to be a TimeOnly value.

Arcade converts the return type to a TimeOnly via the following transformations:

  • TimeOnly objects are returned unchanged.
  • DateTime objects are converted by removing their date component.
  • DateTimeOffset objects are converted by removing their date component and offset.
  • strings are parsed if they match the ISO 8601 format, HH:MM:SS.
  • all other types are converted to null.
TimestampOffset

The return type is expected to be a DateTimeOffset value.

Arcade converts the return type to a DateTimeOffset via the following transformations:

  • DateTimeOffset objects are returned unchanged.
  • DateTime objects display their offset from UTC based on their timezone.
  • DateOnly objects are converted assuming the time is midnight with no offset from UTC.
  • strings are parsed if they match the ISO 8601 format, YYYY-MM-DDTHH:MM:SS[+/-]HH::MM.
  • all other types are converted to null.

Applies to

TargetVersions
.NET Standard 2.0100.11 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.0 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.11 - 200.8
Xamarin.Android100.11 - 100.15
Xamarin.iOS100.11 - 100.15
UWP100.11 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.