<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How does Arcade handle nulls? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-does-arcade-handle-nulls/m-p/1151159#M52441</link>
    <description>&lt;P&gt;How does Arcade handle nulls?&lt;/P&gt;&lt;P&gt;Examples:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Can we do math on nulls?&lt;UL&gt;&lt;LI&gt;1 + null = ?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Can we concatenate nulls?&lt;UL&gt;&lt;LI&gt;"foo" + null = ?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;How does aggregating on nulls work?&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Average(&lt;/SPAN&gt;&lt;SPAN class=""&gt;$layer&lt;/SPAN&gt;&lt;SPAN&gt;, "flag_1"&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;If there are nulls in the&amp;nbsp;"flag_1" field, will they be included in the average's count?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Does null equal null?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Does null not equal null?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Is there anything else about nulls that we should be aware of?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Mar 2022 07:48:53 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2022-03-07T07:48:53Z</dc:date>
    <item>
      <title>How does Arcade handle nulls?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-does-arcade-handle-nulls/m-p/1151159#M52441</link>
      <description>&lt;P&gt;How does Arcade handle nulls?&lt;/P&gt;&lt;P&gt;Examples:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Can we do math on nulls?&lt;UL&gt;&lt;LI&gt;1 + null = ?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Can we concatenate nulls?&lt;UL&gt;&lt;LI&gt;"foo" + null = ?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;How does aggregating on nulls work?&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Average(&lt;/SPAN&gt;&lt;SPAN class=""&gt;$layer&lt;/SPAN&gt;&lt;SPAN&gt;, "flag_1"&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;If there are nulls in the&amp;nbsp;"flag_1" field, will they be included in the average's count?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Does null equal null?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Does null not equal null?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Is there anything else about nulls that we should be aware of?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 07:48:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-does-arcade-handle-nulls/m-p/1151159#M52441</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-03-07T07:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: How does Arcade handle nulls?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-does-arcade-handle-nulls/m-p/1151166#M52442</link>
      <description>&lt;P&gt;Null values are basically handled like zero (or "" for strings), &lt;A href="https://community.esri.com/t5/arcgis-online-ideas/arcade-don-t-treat-null-as-zero-in-mathematical/idi-p/1147431" target="_blank" rel="noopener"&gt;though I'm trying to get that changed&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Console("1 + null = " + (1 + null))
Console("'foo' + null = " + ('foo' + null))
Console("null == null = " + (null == null))
Console("null != null = " + (null != null))

Console("\nOther stuff:")
Console("Abs(null) = " + Abs(null))
Console("Min([null, 1, 2]) = " + Min([null, 1, 2]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;1 + null = 1
'foo' + null = foo
null == null = true
null != null = false

Other stuff:
Abs(null) = 0
Min([null, 1, 2]) = 0&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;How does aggregating on nulls work?&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;If there are nulls in the&amp;nbsp;"flag_1" field, will they be included in the average's count?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;If you aggregate on a feature set, nulls will be filtered out (at least for Min). For arrays,&amp;nbsp;&lt;A href="https://community.esri.com/t5/geoprocessing-questions/arcade-expression-to-calculate-average/m-p/1147513" target="_blank" rel="noopener"&gt;You have to do it yourself.&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 08:20:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-does-arcade-handle-nulls/m-p/1151166#M52442</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-03-07T08:20:58Z</dc:date>
    </item>
  </channel>
</rss>

