English

Problem: Unable to calculate field values of selected features in ArcGIS Online

Description

Field calculations in ArcGIS Online allow the altering of fields in the attribute table of a hosted feature layer based on the calculation expression defined. However, after selecting the features of a layer and running field calculations, the attributes of all the features are calculated.

Cause

This is a known limitation. Field calculations alter the values of every row for a selected single column (field) in the attribute table of a layer. For more information, refer to BUG-000117674.

Solution or Workaround

To resolve this issue, use one of the following workarounds:

Create a filter and calculate the field values of the filtered data 

  1. In ArcGIS Online Map Viewer, create filters on the hosted feature layer to filter the desired features. Refer to Create filters for steps to do this.
  2. In the attribute table of the feature layer, click the column containing the values to calculate, and click Calculate.
  3. In the Calculate Field dialog box, type the calculation expression, and click Calculate. For more information, refer to Calculate field values.
    An image of the Calculate Field dialog box.
    Field values of the selected features are updated based on the calculation expression.
  4. To view all data, remove the filter created in step 1. Browse to the feature layer in Contents, click Filter An image of the Filter icon., and click Remove Filter.

Calculate the field values of the selected features in ArcGIS Pro
  1. In ArcGIS Pro, create a new project, and sign in to ArcGIS Online. Refer to Create a new project for steps to do this.
    Note:
    If a Sign In prompt appears, provide the ArcGIS Online account credentials.
  2. Add the hosted feature layer to the map. Refer to Add a WFS service from your active portal connection for steps to do this. The feature layer is displayed on the map.
  3. In the Map tab, select any option from the Selection group as a method to select the desired features. The selected features are highlighted.
  4. Right-click the layer in the Contents pane, and click Attribute Table An image of the Attribute Table icon..
  5. In the attribute table, right-click the field to calculate, and click Calculate Field.
  6. In the Calculate Field pane, specify the Expression Type and the Expression, and click Run. For more information, refer to Fundamentals of field calculations.
    An image of the Calculate Field pane.
    The attributes for the selected features are calculated based on the specified expression and the updates are reflected in the ArcGIS Online hosted feature layer.

Related Information