IS NULL error in Model Builder causes software crash

878
4
12-13-2018 08:02 AM
RamseyJeff
New Contributor III

Hi folks,

I'm using modelbuilder in ArcMap 10.3.1. I'm building a simple model to assign the neighborhood where a point is located. It goes like this: 1) spatial join (points and nhoods) 2) join that new layer to the original points layer 3) select only those points with null values for neighborhood 4) use field calculator to assign neighborhoods to points.

My problem is with step 3. Whenever the SQL expression for selecting a subset of the data includes IS NULL, the software crashes. If it has an = sign, then everything's fine. My problem is that I have null values and need to select them! I could just overwrite all the data every time (not making a selection before field calculate), but am trying to avoid that. Seems like a weird bug, and one that may have existed way back in the day. Is there a fix for this? 

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

is None

for featureclass in a gdb for example or

= ''

for shapefiles

if it is a field calculator expression

0 Kudos
RamseyJeff
New Contributor III

I'm using the "select layer by attribute" tool which just gives the query builder. Screenshot below. What am I doing wrong? If I do X=' ' then I get all rows with a blank value, but not the nulls. Thanks for your help!

0 Kudos
DanPatterson_Retired
MVP Emeritus

When building the expression, see that "Get Unique Values' button, click on it and the ways 'None",'Null" or emptiness will be shown there.  You may find that there are many different variants.  Select from the list shown, dont type since NONE is not None.  If there are several, then use … Not In (…..) where …. represents the null-like objects like '' or None or Null etc

0 Kudos
RamseyJeff
New Contributor III

Thanks for your continued help. Clicking on unique values gets me all the values currently found in that field. Below is a screenshot for a school version of this model (if this point is on a school taxlot, fill in a field with that school's name). Currently, most points are NULL, but not all. I don't want this model to mess with the ones that aren't NULL so I'm trying to set up a query to just include the NULLs. 

If I put in "School_name Is NULL" or "...= NULL" using either the operator buttons or through the get unique values list, it CRASHES. Every time. Using Not In wouldn't work, because the list of possibilities is going to change over time. I'd have to update the model each time a point is found in a new school. Definitely seems like a software bug, as this is a simple command that would work outside of Model Builder (using definition query, for example). Am I missing something?

0 Kudos