Reputation
6,095
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
14 42
Newest
 Yearling
Impact
~187k people reached

2d
comment Field calculator if and elseif statement with <Null> values in ArcGis 10.1
Yeah, that would do it :) If you could mark the answer as correct, I'd really appreciate it.
2d
comment Field calculator if and elseif statement with <Null> values in ArcGis 10.1
Another expression you can try: (0,1)[bool(!NextDown_Copy!)].
2d
comment Field calculator if and elseif statement with <Null> values in ArcGis 10.1
I'm at a complete loss as to why this is failing for you. I tested with double fields, too, and it's working for me in ArcGIS 10.2.2.
2d
comment Field calculator if and elseif statement with <Null> values in ArcGis 10.1
I just tested all 3 of these options on my own test feature class (in a file geodatabase, where both fields are text-formatted), and all 3 of them worked as expected. How exactly is your data formatted? You're not trying to run this while you have any features selected, right?
2d
comment Field calculator if and elseif statement with <Null> values in ArcGis 10.1
Is Headwater a text field? If so, try "0" if !NextDown_Copy! else "1"
Feb
8
comment Field calculator if and elseif statement with <Null> values in ArcGis 10.1
That's very odd. What if you try 1 if !NextDown_Copy! is None else 0?
Feb
5
revised Field calculator if and elseif statement with <Null> values in ArcGis 10.1
added 7 characters in body
Feb
5
answered Field calculator if and elseif statement with <Null> values in ArcGis 10.1
Feb
5
reviewed Approve How to make a line shapefile converted from a gpx track file display over basemaps such as OpenStreetMap?
Feb
5
comment Adding a Field to a Feature Class using Python
Change your workspace to 'E:\\Programming\\Redlands.gdb' -- the backslashes need to be escaped, otherwise ArcGIS will not be looking in the correct location.
Feb
5
reviewed Approve Adding a Field to a Feature Class using Python
Feb
4
revised Python Process Question
Code block
Feb
4
answered Python Process Question
Feb
3
reviewed Approve How to migrate GDB data into PostGIS without ESRI apps?
Feb
3
reviewed Approve forest classification using SCP and QGIS
Feb
3
reviewed Edit Field Filter and Value Pick List for a Python Toolbox ValueTable Parameter
Feb
3
revised Field Filter and Value Pick List for a Python Toolbox ValueTable Parameter
Improved Formatting: moved commas to end of each line within the arcpy.Parameter(), just so it reads better
Feb
2
revised Field Calculator - conditional function and string variable?
added 1 character in body
Feb
2
revised Field Calculator - conditional function and string variable?
cleaned up code formatting
Jan
28
reviewed Approve software-recommendation tag wiki excerpt