Honor Definition Query in Arcade Validation

1028
3
10-25-2022 04:17 AM
Status: Implemented
Labels (1)
JohannesLindner
MVP Frequent Contributor

When you validate an Arcade expression, Pro takes a feature (the first?) from the table, applies the expression to it, and returns errors it encounters. This validation does not take into account definition queries.

For example: I have a text field with date values that I wanto to convert into actual dates. In the layer, I have a definition query that filters out null values. The Arcade validation doesn't honor that query and validates the expression with an empty value, giving an error.

The actual tool does honor the definition query, leading to the absurd situation that the tool runs successfully although the expression failed to validate. Also, it makes debugging really difficult, because there's nothing wrong with the expressions or the (visible) values in the table.

JohannesLindner_0-1666696548370.png

 

Please make the Arcade validation honor definition queries.

 

3 Comments
Rémy_Gourrat

@JohannesLindner good post.

It's the same thing if before you launch calculate field, you make a selection attribute to discard null values.

I thougth ArcGIS Pro test on ly on the current selection.

DrewFlater
Status changed to: In Product Plan

This is more of a bug in the Calculate Field tool's Arcade expression builder, as it works in Label Expression builder with Arcade, and other tested areas. The issue will be investigated and addressed in the Near term (next 1 or 2 releases).

AmeliaBradshaw
Status changed to: Implemented

This Idea has been implemented in ArcGIS Pro 3.1. Please see the What's New documentation for more new features in Pro 3.1.