I am currently working on a housing survey for the city. I want to pull all features that do not have an attachment to make sure that we get a picture of each house in the city. Is this possible?
I'd say it's possible with some python for the arcgis api. https://developers.arcgis.com/python/guide/using-attachments-with-feature-layers/
Rough sketch of how to:
Hi Patrick Grogan-Myers,
Using a definition expression that queries all the object id's with Query Attachments can return all the features that have attachments: Query Attachments (Feature Service/Layer)—ArcGIS REST API: Services Directory | ArcGIS for Developers. Once you have those object id's you could feasibly list them and then query the layer for object id's not equal to those in the list. I have not tried this second part myself so I'm not 100% sure if it would work or not.
Another option is to use Arcade to filter the features without attachments in a Web Map. This is explained on this GeoNet blog. See Part 1: Calculate the attachment ID - except the filter in step 4 would be CountAttachments equals 0.
I'm thinking Arcade might be the better option here as it will allow you to see the location of houses without pictures right off the bat. Hope this helps!
-Peter
check this article out I found it very helpful for doing a very similar task.
Visualize your attachments in ArcGIS Online with Arcade
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.