<?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: Arcade symbology expression working in Pro, but not in AGOL? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology-expression-working-in-pro-but-not/m-p/1386230#M57669</link>
    <description>&lt;P&gt;Unfortunately, the Map Viewer doesn't support label formatting tags in Arcade&lt;/P&gt;</description>
    <pubDate>Fri, 23 Feb 2024 19:15:16 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2024-02-23T19:15:16Z</dc:date>
    <item>
      <title>Arcade symbology expression working in Pro, but not in AGOL?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology-expression-working-in-pro-but-not/m-p/1385442#M57616</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a label expression written in Arcade that works in ArcGIS PRO (v. 3.0), but it is not working correctly in AGOL.&amp;nbsp; Basically, I want to label (and format) an address in one of the following ways depending on unit or building number existing in a separate field:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Street Number (if no unit or bldg num)&lt;/LI&gt;&lt;LI&gt;Street Number + Unit (if unit, no bldg num)&lt;/LI&gt;&lt;LI&gt;Street Number + Bldg (if no unit, bldg num)&lt;/LI&gt;&lt;LI&gt;Street Number + Bldg + Unit (if unit &amp;amp; bldg num)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The expression below works in ArcGIS Pro, but it is not working in AGOL.&amp;nbsp; I am pretty new to Arcade,&amp;nbsp; and any help appreciated!&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;var s = $feature.STNUM&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;var u = $feature.UNIT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;var b = $feature.BUILDING;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;If(!IsEmpty(u) &amp;amp;&amp;amp; !IsEmpty(b)){&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;return "&amp;lt;BOL&amp;gt;" + s + "&amp;lt;/BOL&amp;gt;" + textformatting.newline + "&amp;lt;BOL&amp;gt;&amp;lt;CLR red = '150' green= '131'&amp;gt;&amp;lt;FNT size= '7'&amp;gt;" + "B " + "&amp;lt;/FNT&amp;gt;&amp;lt;/CLR&amp;gt;&amp;lt;/BOL&amp;gt;" + "&amp;lt;FNT size= '7'&amp;gt;" + b + "&amp;lt;/FNT&amp;gt;" + textformatting.newline + "&amp;lt;BOL&amp;gt;&amp;lt;CLR red = '255'&amp;gt;&amp;lt;FNT size= '7'&amp;gt;" + " U " + "&amp;lt;/FNT&amp;gt;&amp;lt;/CLR&amp;gt;&amp;lt;/BOL&amp;gt;" + "&amp;lt;FNT size= '7'&amp;gt;" + u + "&amp;lt;/FNT&amp;gt;"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;If(IsEmpty(u) &amp;amp;&amp;amp; !IsEmpty(b)){&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;return "&amp;lt;BOL&amp;gt;" + s + "&amp;lt;/BOL&amp;gt;" + textformatting.newline + "&amp;lt;BOL&amp;gt;&amp;lt;CLR red = '150' green = '131'&amp;gt;&amp;lt;FNT size= '7'&amp;gt;" + "B " + "&amp;lt;/FNT&amp;gt;&amp;lt;/CLR&amp;gt;&amp;lt;/BOL&amp;gt;" + "&amp;lt;FNT size= '7'&amp;gt;" + b + "&amp;lt;/FNT&amp;gt;"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;If(!IsEmpty(u) &amp;amp;&amp;amp; IsEmpty(b)){&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;return "&amp;lt;BOL&amp;gt;" + s + "&amp;lt;/BOL&amp;gt;" + textformatting.newline + "&amp;lt;BOL&amp;gt;&amp;lt;CLR red = '150' green = '131'&amp;gt;&amp;lt;FNT size= '7'&amp;gt;" + " U " + "&amp;lt;/FNT&amp;gt;&amp;lt;/CLR&amp;gt;&amp;lt;/BOL&amp;gt;" + "&amp;lt;FNT size= '7'&amp;gt;" + u + "&amp;lt;/FNT&amp;gt;"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;else {return "&amp;lt;BOL&amp;gt;" + s + "&amp;lt;/BOL&amp;gt;" }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Leslie O'Hare&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 14:56:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology-expression-working-in-pro-but-not/m-p/1385442#M57616</guid>
      <dc:creator>LeslieO_Hare2</dc:creator>
      <dc:date>2024-02-22T14:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade symbology expression working in Pro, but not in AGOL?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology-expression-working-in-pro-but-not/m-p/1385654#M57636</link>
      <description>&lt;P&gt;This blog walks through the process if you're using the not old Map Viewer:&lt;BR /&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/color-pop-ups/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/color-pop-ups/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You would likely want to restructure your arcade expression to return a WHEN statement against the unit and building not being null; and the default can be an empty string "". That would reproduce the same as it exists in ArcGIS Pro.&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/logical_functions/#when" target="_blank"&gt;https://developers.arcgis.com/arcade/function-reference/logical_functions/#when&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The other thing that I might do is to tidy up the HTML tags by wrapping them in a few variables since all of them are being reused in various ways. You can also use string literals to make it neater as well:&lt;BR /&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/manage-your-strings-quite-literally-with-arcade-1-11/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/manage-your-strings-quite-literally-with-arcade-1-11/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 19:41:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology-expression-working-in-pro-but-not/m-p/1385654#M57636</guid>
      <dc:creator>GIS_Spellblade</dc:creator>
      <dc:date>2024-02-22T19:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade symbology expression working in Pro, but not in AGOL?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology-expression-working-in-pro-but-not/m-p/1386230#M57669</link>
      <description>&lt;P&gt;Unfortunately, the Map Viewer doesn't support label formatting tags in Arcade&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 19:15:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology-expression-working-in-pro-but-not/m-p/1386230#M57669</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-02-23T19:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade symbology expression working in Pro, but not in AGOL?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology-expression-working-in-pro-but-not/m-p/1386667#M57685</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 12:13:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-symbology-expression-working-in-pro-but-not/m-p/1386667#M57685</guid>
      <dc:creator>LeslieO_Hare2</dc:creator>
      <dc:date>2024-02-26T12:13:01Z</dc:date>
    </item>
  </channel>
</rss>

