when inputting this python script into field calculator Arcmap freezes and crashes:
code block
def my_func(my_field)
if my_field is None:
return " "
while my_field is not None:
pass
field
My_func(!" "!)
If there is a large amount of dat in this field is there another way to sort more efficiently?
Solved! Go to Solution.
unfortunately not, a space isn't the same as null. Also see the help file on using code blocks ArcGIS Help (10.2, 10.2.1, and 10.2.2)
do you have a field name with just a space in its name (! !)?
Most of the time the fields that I am trying to run this script on are date fields that are set up in the format of
%m-%d-%y. The issue I keep facing is having to go through the selection and find all null values, then calculate them after that. I was just hoping that this could be a way to semi automate that process.
unfortunately not, a space isn't the same as null. Also see the help file on using code blocks ArcGIS Help (10.2, 10.2.1, and 10.2.2)
The field name that I run this code on is DATE_ and for (my_field) inside of the function is what I use as a field for running the script. The field name isn't a space it comes out as this in the box below the pre script logic:
DATE_=
my_func(!DATE_!)
It was the my_func(" ") in your original post that was confusing
Haha Sorry! Thanks for that link, I found something in there that might make it all better.
If there is a large amount of dat in this field is there another way to sort more efficiently?
What about select by attributes Date_ IS NULL?
Then calculate field = " "
R_