Select to view content in your preferred language

Only show latest point made w/in a polygon

1132
3
08-09-2023 12:55 AM
elpinguino
Frequent Contributor

I've put together a dashboard which includes a map of building assessments. We've gone into the reassessment phase now, and they want the dashboard to only show the latest reassessment points now. I'm sure there is a way to do this in arcade- maybe a filter by or intersect? Multiple points (assessments) sit within a polygon parcel. Or maybe I'm really blanking and there's an even easier way to do it?

The project was set up in an emergency scenario, so we didn't get related tables set up if you're wondering.

Just want the green arrow dot to show within this parcel. Not the others.

elpinguino_0-1691567622400.png

 

Sorry if I've posted in the wrong section. Wasn't sure where this question would best fall under!

 

0 Kudos
3 Replies
ChristopherCounsell
MVP Regular Contributor

https://www.esri.com/arcgis-blog/products/arcgis-online/analytics/use-arcade-geometry-functions/

This blog post has some methods for this. Intersects returns a boolean true/false.

You probably want something that gets a featureset (a collection of all assessments) then filters. The filter can be done by something like contains() or by a building ID, if you have a key field in both the polygon and point layer. This could also be calculated if you don't have one, in ArcGIS Pro, and used for future point creation.

Or a longer method with no arcade:

  1. Use Experience Builder
  2. Add a map with your polygons.
  3. Add a list widget with an image. Put the table/data source as your points layer and your attachments as the image source. Add dynamic text from the points table. Sort by most recent. 
  4. Set the list widget to filter based on the active polygon selected using actions. You'll need a relationship, such as building ID. You could generate this by running a spatial join in pro. Unless you have the building ID populated in both natively.
  5. The list widget will show all assessments, when you select a polygon, it will only show the assessments for that site sorted by most recent.

 

elpinguino
Frequent Contributor

Thanks @ChristopherCounsell . This looks like a good article. I've read over it am going to give it a go with my parcels and points. I'll try and go the Arcade pathway in Map Viewer rather than in Experience Builder or prebaking in ArcPro for this one. If I can get it to work in symbology I'll make everything but the most recent building assessment point transparent. 

ChristopherCounsell
MVP Regular Contributor

you won't be able to symbolize this way. no active spatial filter on points based on polygon.

Live way to do it is to have the polygon as the active layer, and the pop-up call upon the point layer.

0 Kudos