Select to view content in your preferred language

Updating Existing Field Values Based on Updated Domains List

332
1
01-04-2024 10:49 AM
BumbleBeast
New Contributor

I have updated an existing domain list for an existing field, which has resulted in the fields differing from the new domains. Is there a way to update field values based on the new domains? I'm using ArcPro version 3.1.2.

0 Kudos
1 Reply
DavidPike
MVP Frequent Contributor

You say 'Fields differing from the new domains' - do you instead mean the values in the field?

If so I'd just use Field Calculator https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field.htm

def replace_value(field):
    if field == 'apple':
        return 'fruit'
    elif field == 'potato':
        return 'vegetable'


# Call the function to update the field values
replace_value(!YourFieldName!)

 

0 Kudos