Select to view content in your preferred language

Using if/then statements to calculate a new field

477
2
09-04-2022 01:31 PM
LucasBeck
Emerging Contributor

Hi everyone,

I am currently using ArcGIS Pro 2.60. I have a situation where I would like to organize some feature class polygons by age class. I already have a field that lists the age of each feature and I am looking for way to create a new field by stating something along the lines of if "age" is x<x then age class is Y, but I have not yet found a way to do this. Do you all know if there is a tool I can use to do something like this and what syntax I would need to use to make the tool work? Thank so much. 

Best,

Lucas 

0 Kudos
2 Replies
JoshuaBixby
MVP Esteemed Contributor

Have you looked at Reclassify Field (Data Management)—ArcGIS Pro | Documentation?  Also, this can be done using Calculate Field (GeoAnalytics)—ArcGIS Pro | Documentation.  I can't provide any more specifics since you haven't shared specifically what the classification is.

0 Kudos
DanPatterson
MVP Esteemed Contributor

There are lots of Community examples

Solved: Writing if/else statement in field calculator for ... - Esri Community

and in the help

Calculate Field Python examples—ArcGIS Pro | Documentation

particularly Calculate fields using logic with Python


... sort of retired...
0 Kudos