Select to view content in your preferred language

Field Calculate using a Python If statement

1190
3
Jump to solution
10-22-2021 07:51 AM
BrianBulla
Honored 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 Alum

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

if WATER == "1":

View solution in original post

3 Replies
JaredPilbeam2
MVP Alum

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

if WATER == "1":
BrianBulla
Honored Contributor

Ah....of course!  Thanks!!

0 Kudos
JoeBorgione
MVP Emeritus

Trust me; Noob is a relative term!

That should just about do it....