Select to view content in your preferred language

Arcade Intersect to Return a Value; Click Show, Data Error in Attribute Table

985
2
09-10-2021 07:31 AM
Clubdebambos
Frequent Contributor

Returning an attribute from a field in an Intersect operation is populating the Popup but showing up as Data Error in the attribute table when i click 'Show'. Also is there a way to not have to click Show each time and that these values will display for all features?

 

// access the boundaries layer
var boundaries = FeatureSetByName($map,"Boundaries")

// sql to filter required boundary level 
var sql = "level = 4";

// apply filter
var boundary_subset = Filter(boundaries, sql);

// Intersect the point with the boundary
var point_intersect = Intersects($feature, boundary_subset);

// return the name field attribute from the boundary layer
return First(point_intersect).name;

 

arcade_intersect_error.JPG

 

~ learn.finaldraftmapping.com
Tags (3)
0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

To your second question: if you could enable that, then your map would be running that entire expression for every feature loaded in the table, which would likely take a long time to run, might even crash your browser. Having the "show" link helps prevent this, and I don't anticipate that changing.

To the first question: in your screenshot, is the working popup coming from the same feature as you have highlighted in the table?

- Josh Carlson
Kendall County GIS
0 Kudos
Clubdebambos
Frequent Contributor

Thanks for the feedback @jcarlson 

Yes, the popup is coming from the same feature as highlighted in the table. I selected and centered on the feature and it intersects with the boundary layer as returned by the value in showing in the Popup.

~ learn.finaldraftmapping.com
0 Kudos