<?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 Re: The Arcade Count() is giving an odd error in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/the-arcade-count-is-giving-an-odd-error/m-p/1167092#M54352</link>
    <description>&lt;P&gt;Oh, right! It uses that first row to validate the script. Okay, try an expression like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var addr = $feature['Address_From2']

Iif(IsEmpty(addr), 0, Count(addr))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;By checking if the value is null first, and explicitly giving nulls an output value, this should pass validation.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Apr 2022 16:40:16 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2022-04-22T16:40:16Z</dc:date>
    <item>
      <title>The Arcade Count() is giving an odd error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/the-arcade-count-is-giving-an-odd-error/m-p/1167073#M54346</link>
      <description>&lt;P&gt;I am trying to use Count() for a simple count of a string in a text field in a feature table in Pro.&lt;/P&gt;&lt;P&gt;It should be as simple as Count(fieldname)&lt;/P&gt;&lt;P&gt;Error&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanBohan_0-1650643131800.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39640i063B96947E045D52/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanBohan_0-1650643131800.png" alt="RyanBohan_0-1650643131800.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Works on another field&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanBohan_1-1650643222490.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39642iD95EDAD66C9B4FB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanBohan_1-1650643222490.png" alt="RyanBohan_1-1650643222490.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Both are text fields&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 16:02:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/the-arcade-count-is-giving-an-odd-error/m-p/1167073#M54346</guid>
      <dc:creator>RyanBohan</dc:creator>
      <dc:date>2022-04-22T16:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: The Arcade Count() is giving an odd error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/the-arcade-count-is-giving-an-odd-error/m-p/1167075#M54348</link>
      <description>&lt;P&gt;Hmmm. Does it behave any differently if you use bracket notation? As in,&lt;STRONG&gt; $feature['Address_From2']&lt;/STRONG&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 16:06:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/the-arcade-count-is-giving-an-odd-error/m-p/1167075#M54348</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-04-22T16:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: The Arcade Count() is giving an odd error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/the-arcade-count-is-giving-an-odd-error/m-p/1167086#M54351</link>
      <description>&lt;P&gt;Thanks for the suggestion, I am still getting the error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears if the first row is &amp;lt;null&amp;gt; that is when the error happens.&amp;nbsp; I am using ArcPro 2.9.2&lt;/P&gt;&lt;P&gt;I am pulling in a csv, and exporting the table to gdb&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Current work around is adding in a dummy row of values.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 16:25:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/the-arcade-count-is-giving-an-odd-error/m-p/1167086#M54351</guid>
      <dc:creator>RyanBohan</dc:creator>
      <dc:date>2022-04-22T16:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: The Arcade Count() is giving an odd error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/the-arcade-count-is-giving-an-odd-error/m-p/1167092#M54352</link>
      <description>&lt;P&gt;Oh, right! It uses that first row to validate the script. Okay, try an expression like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var addr = $feature['Address_From2']

Iif(IsEmpty(addr), 0, Count(addr))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;By checking if the value is null first, and explicitly giving nulls an output value, this should pass validation.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 16:40:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/the-arcade-count-is-giving-an-odd-error/m-p/1167092#M54352</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-04-22T16:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: The Arcade Count() is giving an odd error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/the-arcade-count-is-giving-an-odd-error/m-p/1167202#M54362</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;!&amp;nbsp; That does it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2022 19:57:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/the-arcade-count-is-giving-an-odd-error/m-p/1167202#M54362</guid>
      <dc:creator>RyanBohan</dc:creator>
      <dc:date>2022-04-22T19:57:30Z</dc:date>
    </item>
  </channel>
</rss>

