def Reclass(arg): if arg in ["222", "333"]: return "<Null>" else: return arg
I want the results as shown below.
Do not return "<NULL>" because it will not set a field to SQL NULL, it will set a field to a text string that says "<NULL>". If you want to set a field to SQL NULL, you want to return None.
Nearly there, but you need to pass in 2 arguments.
#prelogic codeblockdef Reclass(arg1, arg2): if arg1 in ["222", "333"]: return "<Null>" else: return arg2#codeReclass(!NAME!, !PNAME!)
Thank you so much~~~~~~
Retrieving data ...