HOW TO
In ArcGIS Pro, it is possible to replace all the values of a field with a default value. However, it is sometimes necessary to replace only certain values of the field for enhanced data accuracy and nuanced spatial analysis.
In this article, fields with a single '0' in the Distance field are replaced with '1' using an Arcade expression. The image below displays the attribute table with the field values to be replaced.
if ($feature.<field_name> == '<initial_value>') { Replace($feature.<field_name>, '<initial_value>', '<new_value>') } else { return($feature.<field_name>) }
Note: If numeric or date field values are used, remove the single quotes (' ') on <initial_value> and <new_value>.
The image below displays the new field values in the Distance field.
Article ID: 000031567
Get help from ArcGIS experts
Download the Esri Support App