Select to view content in your preferred language

ArcGIS Pro Report Expression Not Reading Joined Field Correctly

75
1
yesterday
dnieves
New Contributor

Hello, I am creating a report in ArcGIS Pro and using an Arcade expression to group two field values into a single label. The field I am referencing comes from a spatial join. 

dnieves_1-1783439435998.png

I have also tried other alternatives such as using what if statements.

dnieves_2-1783439581624.png

The expression returns nothing. So how should joined fields be referenced inside report expressions? Do joined fields need a specific syntax in Arcade when used in a report?

Thank you!

 

 

 

 

0 Kudos
1 Reply
Robert_LeClair
Esri Esteemed Contributor

Joined fields should be referenced in Arcade using bracket notation and the fully qualified table.field name:

var a = $feature["JoinTableName.FieldA"]
var b = $feature["JoinTableName.FieldB"]
return a + " / " + b


This is the documented syntax for joined fields in Arcade: $feature['tablename.fieldname'] (same Arcade field access rules apply).

If your expression returns nothing, the most common causes are:

  • You used $feature.JoinTableName.FieldA (dot syntax won’t work for joined fields).
  • The join table name in the layer is not what you think (it may be an alias or auto-renamed). Use the exact qualified name shown in the layer’s attribute table fields list.
  • The “joined” values aren’t actually present (no match in the join), so the joined field is null.

Also, if you’re using a temporary/in-memory join, consider writing the join results to a new dataset (for example, run Spatial Join to create an output feature class) so the report is reading physical fields rather than a live join.