Select to view content in your preferred language

Attachments() Function in Web Map Symbology

595
2
12-29-2023 04:47 AM
Labels (2)
Tim-Woodfield
Occasional Contributor

I am trying to set up an arcade expression in the layer symbology that will differentiate features with and without attachments. The Count(Attachments($feature)) part works great in a popup attribute expression and returns the necessary values but I am getting an error when trying to use the same code in the symbology expression. It is saying 'Attachments' is not defined.

 

Here's my code:

If(Count(Attachments($feature)) > 0) {
      // if count is greater than zero there are attachments
      return 'Has Attachments'
  } else {
      // otherwise the feature has been inspected but missing photos
      return 'No Attachments'
  }

 The funny part is, if I click run to test, it gives me the correct output but the Done button is grayed out.

2 Replies
rwrenner_esri
Esri Contributor

I'm seeing the same thing in Map Viewer on a layer with attachments enabled. I'd recommend opening a tech support ticket to get this addressed.

Based on what I'm seeing in the blog post below, it appears using Attachments() for symbology did work at one point in Map Viewer Classic but it no longer seems to work there either (returns "attachments is not available").

https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/visualize-your-attachments-in-arcgis...

0 Kudos
Tim-Woodfield
Occasional Contributor

Thank you for the feedback! I'll submit a ticket

0 Kudos