Hi,
Trying to calculate a field based on another field. Want to give Contiguous a "Y" where Contig_ID is not NULL.
"Calculate Field for Contiguous"
Field Name: Contiguous
I've read plenty of posts explaining that NULL == None in python, but this code only returns Y for all numeric values in Contig_ID. Where Contig_ID == Null, no values are returned to Contiguous.
Any help would be grand!
Thanks
Rich
Trying to calculate a field based on another field. Want to give Contiguous a "Y" where Contig_ID is not NULL.
"Calculate Field for Contiguous"
Field Name: Contiguous
Expression: Answer(!Contig_ID!) Code Block: def Answer(CI): if CI ==None: return "N" else: return "Y"
I've read plenty of posts explaining that NULL == None in python, but this code only returns Y for all numeric values in Contig_ID. Where Contig_ID == Null, no values are returned to Contiguous.
Any help would be grand!
Thanks
Rich
That is weird though, as I'm sure I have done this before in Arc!
An annoying workaround would be to make a selection by attributes where Contig_ID IS NULL, set that to a marker value (i.e. 99999) and use that in your second calculation:
Let's hope the ESRI guys have an answer!