HOW TO

Display the number of attachments in an attribute table using Arcade in ArcGIS Pro

Last Published: June 19, 2024

Summary

In ArcGIS Pro, file attachments are stored in a separate attachment table within the geodatabase. However, the number of attachments added to the feature cannot be viewed directly in the attribute table. This article describes the workflow to display the number of attachments in the attribute table using an Arcade expression, as demonstrated in the image below.

The attribute table of a feature layer

Procedure

  1. Open the project in ArcGIS Pro.
  2. Add a new field to the attribute table of the feature layer.
    1. Open the attribute table of the feature layer.
    2. In the attribute table, click Add Field The Add Field button.
    3. In the Fields view, specify a name for the attachment field in the Field Name column.
    4. Double-click the Alias column and specify an alias for the field.
    5. Double-click the Data Type column and select Double from the drop-down menu.
    6. On the Fields tab, in the Changes group, click Save.
The Fields view
  1. Calculate the new field to determine the number of attachments added to the feature.
    1. Open the attribute table, right-click the new field, and click Calculate Field.
    2. In the Calculate Field dialog box, for Expression Type, select Arcade from the drop-down list.
    3. Copy the following expression paste it into theĀ Expression box.
Count(Attachments($feature))
  1. Click the Verify button to validate the expression.
  2. Click OK.
Note:
Enable MapTips to display the number of attachments when the pointer is placed on a feature, if necessary.
The Calculate Field dialog box

Article ID: 000030595

Software:
  • ArcGIS Pro 3 1
  • ArcGIS Pro 3 0
  • ArcGIS Pro 2 9x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options