Field Calculate using a Python If statement

200
3
Jump to solution
10-22-2021 07:51 AM
BrianBulla
Regular Contributor

Hi,

I'm trying to update the field "WATER" with new values.  We have just created a proper YES/NO domain for this field, so I want to update the existing 1 or 0 value to the proper domain value or "YES" or "NO".  Can anyone explain what might be happening with this error I am seeing.  I am a total NOOB to Python.

BrianBulla_0-1634914248126.png

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JaredPilbeam2
MVP Regular Contributor

You need to use 'equal to'. You have 'equals'.

if WATER == "1":

View solution in original post

3 Replies
JaredPilbeam2
MVP Regular Contributor

You need to use 'equal to'. You have 'equals'.

if WATER == "1":

View solution in original post

BrianBulla
Regular Contributor

Ah....of course!  Thanks!!

0 Kudos
JoeBorgione
MVP Esteemed Contributor

Trust me; Noob is a relative term!

can't wait to retire....