<ExpressionTypes.h> - Collection of Expression Enums

Collection of Expression enumerations. More...

Header: #include <ExpressionTypes.h>

Types

enum class ArcadeExpressionReturnType { Automatic, Number, String, Dictionary, Any, …, TimestampOffset }
enum class ArcadeProfile { Restricted, Unrestricted, Alias, AttributeRuleCalculation, AttributeRuleConstraint, …, QuickCapture }

Detailed Description

Type Documentation

[since Esri::ArcGISRuntime 100.11] enum class ArcadeExpressionReturnType

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

The ArcadeExpressionReturnType can be one of:

ConstantValueDescription
ArcadeExpressionReturnType::Automatic0The 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.
ArcadeExpressionReturnType::Number1The return type is expected to be a floating-point number. Arcade will convert the return type to a float64 via the following transformations: - booleans return 1 if true, 0 otherwise. - integral types are converted to float64. This may be a narrowing conversion. - float64 values are returned unchanged. - nullptr is converted to 0. - strings are parsed asfloat64. - all other types are converted to NaN.
ArcadeExpressionReturnType::String2The return type is expected to be a string. Arcade will convert the return type to a string via the Arcade Text() function.
ArcadeExpressionReturnType::Dictionary3The 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 nullptr.
ArcadeExpressionReturnType::Any4The 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.
ArcadeExpressionReturnType::Boolean5The 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.
ArcadeExpressionReturnType::Date6The return type is expected to be a QDateTime value. Arcade converts the return type to a QDateTime via the following transformations: - QDateTime objects are returned unchanged. - DateOnly objects are converted by assuming the time is midnight. - TimestampOffset 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 nullptr.
ArcadeExpressionReturnType::DateOnly7The 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. - QDateTime objects are converted by removing their time component. - TimestampOffset 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 nullptr.
ArcadeExpressionReturnType::TimeOnly8The 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. - QDateTime objects are converted by removing their date component. - TimestampOffset 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 nullptr.
ArcadeExpressionReturnType::TimestampOffset9The return type is expected to be a TimestampOffset value. Arcade converts the return type to a TimestampOffset via the following transformations: - TimestampOffset objects are returned unchanged. - QDateTime 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 nullptr.

This enum was introduced or modified in Esri::ArcGISRuntime 100.11.

[since Esri::ArcGISRuntime 100.14] enum class ArcadeProfile

The execution context a script will run under.

The Arcade profile specifies the context under which a script should be executed. This allows the script writer to program against a set of known profile variables and functionality restrictions that are appropriate for their use case. This includes the set of expected return types.

It is erroneous to try to use restricted functionality, for instance, the use of FeatureSets while working in the labeling profile. Often the restrictions are applied due to performance considerations.

This API does not check that the required profile variables are present for evaluation within a certain profile, nor does it check the return type is the expected type. The ArcadeEvaluationResult::castTo(Esri::ArcGISRuntime::ArcadeExpressionReturnType) method converts the type of the evaluation result using Arcade casting rules.

The ArcadeProfile can be one of:

ConstantValueDescription
ArcadeProfile::Restricted0Usage of any optional feature is blocked. Prefer this as your default.
ArcadeProfile::Unrestricted1All optional functionality is allowed. The default profile due to compatibility reasons, prefer ArcadeProfile.restricted as default.
ArcadeProfile::Alias2Alias profile. Alias profile functionality restrictions apply, only Alias profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::AttributeRuleCalculation3Attribute Rule Calculation profile. Attribute Rule Calculation profile functionality restrictions apply, only Attribute Rule Calculation profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::AttributeRuleConstraint4Attribute Rule Constraint profile. Attribute Rule Constraint profile functionality restrictions apply, only Attribute Rule Constraint profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::AttributeRuleValidation5Attribute Rule Validation profile. Attribute Rule profile functionality restrictions apply, only Attribute Rule profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::Constraint6Constraint profile. Constraint profile functionality restrictions apply, only Constraint profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::DashboardFormatting7Dashboard Formatting profile. Dashboard Formatting profile functionality restrictions apply, only Dashboard Formatting profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::DashboardData8Dashboard Data profile. Dashboard Data profile functionality restrictions apply, only Dashboard Data profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::DictionaryRenderer9Dictionary Renderer profile. Dictionary Renderer profile functionality restrictions apply, only Dictionary Renderer profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::FeatureZ10Feature Z profile. Feature Z profile functionality restrictions apply, only Feature Z profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::FieldCalculation11Field Calculation profile. Field Calculation profile functionality restrictions apply, only Field Calculation profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::FieldMapping12Field Mapping profile. Field Mapping profile functionality restrictions apply, only Field Mapping profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::Geoanalytics13Geoanalytics profile. Geoanalytics profile functionality restrictions apply, only Geoanalytics profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::Labeling14Labeling profile. Labeling profile functionality restrictions apply, only Labeling profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::Layout15Layout profile. Layout profile functionality restrictions apply, only Layout profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::MeasureVisualization16Measure Visualization profile. Measure Visualization profile functionality restrictions apply, only Measure Visualization profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::Popup17Popup profile. Popup functionality profile restrictions apply, only Popup profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::Velocity18Velocity profile. Velocity profile functionality restrictions apply, only Velocity profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::Visualization19Visualization profile. Visualization profile functionality restrictions apply, only Visualization profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::GeotriggerNotification20Geotrigger Notification profile. Geotrigger Notification profile functionality restrictions apply, only Geotrigger Notification profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::FormCalculation21Form Calculation profile. Form Calculation profile functionality restrictions apply, only Form Calculation profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::Task22Task profile. Task profile functionality restrictions apply, only Task profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::PopupElement23Popup Element profile. Popup Element profile functionality restrictions apply, only Popup Element profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::LocationUpdateConstraint24Location Update Constraint profile. Location Update Constraint profile functionality restrictions apply, only Location Update Constraint profile variables should be made available. See Arcade profile documentation.
ArcadeProfile::QuickCapture25Quick Capture profile. Quick Capture functionality restrictions apply, only Quick Capture variables should be made available. See Arcade profile documentation.

This enum was introduced or modified in Esri::ArcGISRuntime 100.14.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.