Select to view content in your preferred language

Documentation about empty strings, nulls, NaN, and Nil in ArcGIS

12-07-2022 09:31 PM
Status: Open
Labels (1)
Honored Contributor

Could Esri create some detailed docs on empty strings, nulls and NaN in ArcGIS?

  1. For ArcGIS supported datatypes, which datatypes allow empty strings as values? Which datatypes have no concept of an empty string, only null? Example: Oracle.
  2. For procedural programming languages that are used in ArcGIS, how do they handle nulls?
    • Python: “None”
    • Arcade/JS null quirks
    • Others
  3. Define the concept of empty strings. Is “ “ (text) different from “” (empty string)?
  4. Empty string best practices in ArcGIS.
  5. When to query for both empty strings and nulls in ArcGIS.
  6. Sometimes people set a default value to a space “ “ or zero, to work around a field that doesn’t allow nulls. Is that a recommended practice?
  7. Describe the different ways to set a value to null in the Attribute Table:
    • Delete a value with the keyboard delete key or by cutting the value (ctrl+x). In an Oracle GDB, the value will be automatically set to null upon saving. 
      • Tip: Don’t select the record and hit the delete key – that will delete the entire record (not what we want).
    • Or, use the field calculator: set the value to null, but not <null>”.
    • Or, if the field has a domain, select <Null> from the picklist.
    • Incorrect: 

      Don’t try to set the value to the literal text “<null>” or "null". That’s not the same thing as it being truly nullNull isn’t a value. It’s the absence of a value.

  8. What is NaN? When is it used in ArcGIS? Example: M values in linear referencing.
    • I think there are cases where NaN is actually negative infinity (float), in Oracle at least.
  9. Nil

I’m aware that there are some bits and pieces of docs pertaining to nulls. But I don’t think those pages cover all the points mentioned above.


Tom Freedman - Working with NULL Much Ado About Nothing