<?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: ArcGIS Online Labels with Arcade Custom Expression Won't Render in App in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/arcgis-online-labels-with-arcade-custom-expression/m-p/112473#M710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which version of the JS API are you using, 4.x or 3.x? Labeling isn't supported in 4.x yet. I was able to verify this in a 4.x app, but noticed the expected behavior in 3.x...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.x test case:&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/bivopobami/edit?html,output" title="https://jsbin.com/bivopobami/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.x test case:&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/fucodadavu/edit?html,output" title="https://jsbin.com/fucodadavu/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Mar 2017 22:23:44 GMT</pubDate>
    <dc:creator>KristianEkenes</dc:creator>
    <dc:date>2017-03-15T22:23:44Z</dc:date>
    <item>
      <title>ArcGIS Online Labels with Arcade Custom Expression Won't Render in App</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-online-labels-with-arcade-custom-expression/m-p/112469#M706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to label address points (with the ArcGIS Online labeling functionality) for one of our city's webmaps. Some of the addresses have unit numbers, some don't. I put together an Arcade expression that checks the "unit" field for values so that all points will be labeled correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; unitVal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;unit
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; stVal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;snumber
&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;mainfunc&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;unitVal&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;stVal&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;unitVal &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;' '&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; stVal
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Concatenate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;stVal&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;unitVal&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;':'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="token function"&gt;mainfunc&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;unitVal&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;stVal&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The labels appear correctly in ArcGIS Online, but will not draw in a web application that calls on that AGO map. Has anyone come across the same issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Labels in ArcGIS Online" class="image-1 jive-image" height="496" src="https://community.esri.com/legacyfs/online/305382_AGO.PNG" width="334" /&gt;&amp;nbsp;&lt;IMG alt="Lack of Labels in Webmap" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/305383_webmap.PNG" style="height: 493px;" width="351" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:43:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-online-labels-with-arcade-custom-expression/m-p/112469#M706</guid>
      <dc:creator>MichaelSakinejad2</dc:creator>
      <dc:date>2021-12-11T06:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Labels with Arcade Custom Expression Won't Render in App</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-online-labels-with-arcade-custom-expression/m-p/112470#M707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Have you tried adding semicolons at the end of your first two lines?&lt;/P&gt;&lt;P&gt;--- Rod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 21:15:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-online-labels-with-arcade-custom-expression/m-p/112470#M707</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-02-13T21:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Labels with Arcade Custom Expression Won't Render in App</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-online-labels-with-arcade-custom-expression/m-p/112471#M708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just tried that, and no change, unfortunately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for looking into it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 21:55:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-online-labels-with-arcade-custom-expression/m-p/112471#M708</guid>
      <dc:creator>MichaelSakinejad2</dc:creator>
      <dc:date>2017-02-13T21:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Labels with Arcade Custom Expression Won't Render in App</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-online-labels-with-arcade-custom-expression/m-p/112472#M709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looking into this as well... will reply if I learn anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, the expression could also be condensed to the following (but it doesn't really matter. Depends on your preference):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; unitVal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;unit&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; stVal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;snumber&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;IIF&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;unitVal &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;' '&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; stVal&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Concatenate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;stVal&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;unitVal&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;':'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:43:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-online-labels-with-arcade-custom-expression/m-p/112472#M709</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2021-12-11T06:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Online Labels with Arcade Custom Expression Won't Render in App</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-online-labels-with-arcade-custom-expression/m-p/112473#M710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which version of the JS API are you using, 4.x or 3.x? Labeling isn't supported in 4.x yet. I was able to verify this in a 4.x app, but noticed the expected behavior in 3.x...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.x test case:&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/bivopobami/edit?html,output" title="https://jsbin.com/bivopobami/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.x test case:&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/fucodadavu/edit?html,output" title="https://jsbin.com/fucodadavu/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 22:23:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-online-labels-with-arcade-custom-expression/m-p/112473#M710</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2017-03-15T22:23:44Z</dc:date>
    </item>
  </channel>
</rss>

