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, …, ModelBuilder } |
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:
Constant | Value | Description |
---|---|---|
ArcadeExpressionReturnType::Automatic | 0 | 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. |
ArcadeExpressionReturnType::Number | 1 | The 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::String | 2 | The return type is expected to be a string. Arcade will convert the return type to a string via the Arcade Text() function. |
ArcadeExpressionReturnType::Dictionary | 3 | 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 nullptr . |
ArcadeExpressionReturnType::Any | 4 | 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. |
ArcadeExpressionReturnType::Boolean | 5 | 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 . |
ArcadeExpressionReturnType::Date | 6 | The 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::DateOnly | 7 | 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. - 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::TimeOnly | 8 | 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. - 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::TimestampOffset | 9 | The 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:
Constant | Value | Description |
---|---|---|
ArcadeProfile::Restricted | 0 | Usage of any optional feature is blocked. Prefer this as your default. |
ArcadeProfile::Unrestricted | 1 | All optional functionality is allowed. The default profile due to compatibility reasons, prefer ArcadeProfile.restricted as default. |
ArcadeProfile::Alias | 2 | Alias profile. Alias profile functionality restrictions apply, only Alias profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::AttributeRuleCalculation | 3 | Attribute 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::AttributeRuleConstraint | 4 | Attribute 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::AttributeRuleValidation | 5 | Attribute Rule Validation profile. Attribute Rule profile functionality restrictions apply, only Attribute Rule profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::Constraint | 6 | Constraint profile. Constraint profile functionality restrictions apply, only Constraint profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::DashboardFormatting | 7 | Dashboard Formatting profile. Dashboard Formatting profile functionality restrictions apply, only Dashboard Formatting profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::DashboardData | 8 | Dashboard Data profile. Dashboard Data profile functionality restrictions apply, only Dashboard Data profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::DictionaryRenderer | 9 | Dictionary Renderer profile. Dictionary Renderer profile functionality restrictions apply, only Dictionary Renderer profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::FeatureZ | 10 | Feature Z profile. Feature Z profile functionality restrictions apply, only Feature Z profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::FieldCalculation | 11 | Field Calculation profile. Field Calculation profile functionality restrictions apply, only Field Calculation profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::FieldMapping | 12 | Field Mapping profile. Field Mapping profile functionality restrictions apply, only Field Mapping profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::Geoanalytics | 13 | Geoanalytics profile. Geoanalytics profile functionality restrictions apply, only Geoanalytics profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::Labeling | 14 | Labeling profile. Labeling profile functionality restrictions apply, only Labeling profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::Layout | 15 | Layout profile. Layout profile functionality restrictions apply, only Layout profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::MeasureVisualization | 16 | Measure Visualization profile. Measure Visualization profile functionality restrictions apply, only Measure Visualization profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::Popup | 17 | Popup profile. Popup functionality profile restrictions apply, only Popup profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::Velocity | 18 | Velocity profile. Velocity profile functionality restrictions apply, only Velocity profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::Visualization | 19 | Visualization profile. Visualization profile functionality restrictions apply, only Visualization profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::GeotriggerNotification | 20 | Geotrigger Notification profile. Geotrigger Notification profile functionality restrictions apply, only Geotrigger Notification profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::FormCalculation | 21 | Form Calculation profile. Form Calculation profile functionality restrictions apply, only Form Calculation profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::Task | 22 | Task profile. Task profile functionality restrictions apply, only Task profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::PopupElement | 23 | Popup Element profile. Popup Element profile functionality restrictions apply, only Popup Element profile variables should be made available. See Arcade profile documentation. |
ArcadeProfile::LocationUpdateConstraint | 24 | Location 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::QuickCapture | 25 | Quick Capture profile. Quick Capture functionality restrictions apply, only Quick Capture variables should be made available. See Arcade profile documentation. |
ArcadeProfile::ModelBuilder | 26 | Model Builder profile. Model Builder functionality restrictions apply, only Model Builder profile variables should be made available. See Arcade profile documentation. |
This enum was introduced or modified in Esri::ArcGISRuntime 100.14.