<?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 Removing blank values via Arcade Expression in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1050840#M40146</link>
    <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I've created a map layout that pulls data from various fields in our new database. Everything is connected and working great now and all the data is coming across mostly correct. The one remaining hurdle I have right now is that when trying to pull data for System Supplier, System Installer and Owner(s) it displays the correct company names but it also carries over a bunch of blank values.&lt;/P&gt;&lt;P&gt;Like so (outlined in red):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SEAMEWE3Companies.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11711i0B7153B7542AA390/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SEAMEWE3Companies.png" alt="SEAMEWE3Companies.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; My Arcade expression is as follows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var role = $feature.ROLE_ID
If(role == 12){
return $feature.COMPANY_NAME
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The intent is to check if a company is ROLE_ID 12 (System Supplier in this case) and return the Company name if it is.&lt;/P&gt;&lt;P&gt;Where I'm stuck is I am not sure why it is even accounting for other companies that don't match the ROLE_ID and fill up my data fields with blanks.&lt;/P&gt;&lt;P&gt;I'm sure it's something simple I'm overlooking but I've been staring at this all day and could use a fresh pair of eyes...&lt;/P&gt;</description>
    <pubDate>Fri, 23 Apr 2021 19:08:22 GMT</pubDate>
    <dc:creator>KieranClark</dc:creator>
    <dc:date>2021-04-23T19:08:22Z</dc:date>
    <item>
      <title>Removing blank values via Arcade Expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1050840#M40146</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I've created a map layout that pulls data from various fields in our new database. Everything is connected and working great now and all the data is coming across mostly correct. The one remaining hurdle I have right now is that when trying to pull data for System Supplier, System Installer and Owner(s) it displays the correct company names but it also carries over a bunch of blank values.&lt;/P&gt;&lt;P&gt;Like so (outlined in red):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SEAMEWE3Companies.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11711i0B7153B7542AA390/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SEAMEWE3Companies.png" alt="SEAMEWE3Companies.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; My Arcade expression is as follows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;var role = $feature.ROLE_ID
If(role == 12){
return $feature.COMPANY_NAME
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The intent is to check if a company is ROLE_ID 12 (System Supplier in this case) and return the Company name if it is.&lt;/P&gt;&lt;P&gt;Where I'm stuck is I am not sure why it is even accounting for other companies that don't match the ROLE_ID and fill up my data fields with blanks.&lt;/P&gt;&lt;P&gt;I'm sure it's something simple I'm overlooking but I've been staring at this all day and could use a fresh pair of eyes...&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 19:08:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1050840#M40146</guid>
      <dc:creator>KieranClark</dc:creator>
      <dc:date>2021-04-23T19:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank values via Arcade Expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1050855#M40147</link>
      <description>&lt;P&gt;That appears to be a dynamic text layout element. What you're seeing is being caused by the &lt;STRONG&gt;delimiter &lt;/STRONG&gt;on the dynamic text. By default, the delimiter includes a whitespace character in addition to whatever you include.&lt;/P&gt;&lt;P&gt;When you define a delimiter, it will return all the values in the table, &lt;EM&gt;even the nulls&lt;/EM&gt;, separated by that delimeter:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_0-1619205526373.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11717i341415546E075650/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_0-1619205526373.png" alt="jcarlson_0-1619205526373.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you're using an Arcade expression, try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;var role = Boolean($feature.ROLE_ID == 12);
if(role){
    return $feature.COMPANY_NAME + ', '
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_1-1619205687467.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11718iB6A14BC37E469573/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_1-1619205687467.png" alt="jcarlson_1-1619205687467.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;A bit better, but there's a pesky comma at the end of the string. Since your expression is simply filtering based on an attribute, it's simpler to add a &lt;EM&gt;Custom query&lt;/EM&gt; to the dynamic text itself.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_3-1619205837600.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11720iD7933FF7378B70BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_3-1619205837600.png" alt="jcarlson_3-1619205837600.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 19:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1050855#M40147</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-04-23T19:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank values via Arcade Expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1050868#M40154</link>
      <description>&lt;P&gt;Wow, yes this is absolutely what I wanted. Thank you!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SEAMEWE3CompanyFixed.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11721i0F1E334975780DC1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SEAMEWE3CompanyFixed.png" alt="SEAMEWE3CompanyFixed.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 19:37:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1050868#M40154</guid>
      <dc:creator>KieranClark</dc:creator>
      <dc:date>2021-04-23T19:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank values via Arcade Expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1051434#M40254</link>
      <description>&lt;P&gt;Hi Josh,&lt;/P&gt;&lt;P&gt;Sorry to bug you again but I have one last tweak I'm trying to figure out.&lt;/P&gt;&lt;P&gt;Some cable systems (mostly planned) do not have a System Installer available yet. What I would like to do is if there are no companies that match ROLE_ID of 11 (System Installer) then display "Not Available"&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 18:19:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1051434#M40254</guid>
      <dc:creator>KieranClark</dc:creator>
      <dc:date>2021-04-26T18:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank values via Arcade Expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1051454#M40257</link>
      <description>&lt;P&gt;Oh, that's tricky. Since you're using a dynamic text element, I don't think there's a "no data" option to return a separate string when there are no values.&lt;/P&gt;&lt;P&gt;Since you're using Arcade per-feature, anything you add to that expression will end up repeating for each row, too, so we can't do it there.&lt;/P&gt;&lt;P&gt;Here's a possible workaround: use the function &lt;STRONG&gt;Distinct&lt;/STRONG&gt; on the layer to return the distinct values for the field in question, and insert your "Not Available" string if the length of the returned array is 0. You'd need some way of then limiting the dynamic text element to show the first value in the table. I haven't tested it, but it's the only think I can think of that &lt;EM&gt;might&lt;/EM&gt; work.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 18:53:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1051454#M40257</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-04-26T18:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank values via Arcade Expression</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1058681#M41017</link>
      <description>&lt;P&gt;Hi Josh,&lt;/P&gt;&lt;P&gt;I'm trying to tackle this issue again after a few weeks of working on other things for this publication and I'm having a little trouble understanding how you're suggesting to use the Distinct function. I'm not sure how to set it up properly to even return a value of 0 if nothing matches.&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 19:14:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/removing-blank-values-via-arcade-expression/m-p/1058681#M41017</guid>
      <dc:creator>KieranClark</dc:creator>
      <dc:date>2021-05-17T19:14:40Z</dc:date>
    </item>
  </channel>
</rss>

