<?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 Error: Runtime Error in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-error-runtime-error/m-p/1079267#M41216</link>
    <description>&lt;P&gt;I'd recommend reviewing the &lt;A href="https://developers.arcgis.com/arcade/guide/logic/" target="_self"&gt;Structure and Logic page&lt;/A&gt; of the Arcade guide, as it goes over some of the specifics for how Arcade works. Regarding your expression:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use &lt;STRONG&gt;return&lt;/STRONG&gt; instead of print to return a value&lt;/LI&gt;&lt;LI&gt;You don't need to return an empty string for features you don't want labeled, simply leave them out of the expression entirely&lt;/LI&gt;&lt;LI&gt;A logical 'AND' in Arcade is &lt;STRONG&gt;&amp;amp;&amp;amp;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Your if statement appears to be filtering the opposite to your stated intent&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Rewriting your expression, it might look like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var n = $feature.name

if(n != 'Wand' &amp;amp;&amp;amp; n != 'Treppe'){
    return n
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you need your map to be in the Classic viewer? Note that in the new version of the Map Viewer, you can apply filters to your label class and avoid this altogether.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jul 2021 15:56:28 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2021-07-15T15:56:28Z</dc:date>
    <item>
      <title>Arcade Error: Runtime Error</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-error-runtime-error/m-p/1079243#M41214</link>
      <description>&lt;P&gt;i have created a web map and i don't want the walls and stairs to be labeled, only the rooms.&lt;BR /&gt;When I take this code for the labeling it comes "Execution Error:Runtime Error: ".&lt;BR /&gt;Can you help me further?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LisaHo_0-1626362987178.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/18531iA16BA8DFCE4E7531/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LisaHo_0-1626362987178.png" alt="LisaHo_0-1626362987178.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 15:30:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-error-runtime-error/m-p/1079243#M41214</guid>
      <dc:creator>LisaHo</dc:creator>
      <dc:date>2021-07-15T15:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Error: Runtime Error</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-error-runtime-error/m-p/1079267#M41216</link>
      <description>&lt;P&gt;I'd recommend reviewing the &lt;A href="https://developers.arcgis.com/arcade/guide/logic/" target="_self"&gt;Structure and Logic page&lt;/A&gt; of the Arcade guide, as it goes over some of the specifics for how Arcade works. Regarding your expression:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use &lt;STRONG&gt;return&lt;/STRONG&gt; instead of print to return a value&lt;/LI&gt;&lt;LI&gt;You don't need to return an empty string for features you don't want labeled, simply leave them out of the expression entirely&lt;/LI&gt;&lt;LI&gt;A logical 'AND' in Arcade is &lt;STRONG&gt;&amp;amp;&amp;amp;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Your if statement appears to be filtering the opposite to your stated intent&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Rewriting your expression, it might look like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var n = $feature.name

if(n != 'Wand' &amp;amp;&amp;amp; n != 'Treppe'){
    return n
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you need your map to be in the Classic viewer? Note that in the new version of the Map Viewer, you can apply filters to your label class and avoid this altogether.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 15:56:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-error-runtime-error/m-p/1079267#M41216</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-07-15T15:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Error: Runtime Error</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-error-runtime-error/m-p/1079289#M41220</link>
      <description>&lt;P&gt;What is the 'print' statement you are using?&amp;nbsp; Replace that with 'return' and see if that works for you:&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;if ($feature["USER_RECEIPT_NU"] == 8967){
    return('')
}
else{
    return($feature["USER_ID_NUMBER"])
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just whipped this up on some data I have in AGOL...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 16:18:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-error-runtime-error/m-p/1079289#M41220</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-07-15T16:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Error: Runtime Error</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-error-runtime-error/m-p/1079383#M41227</link>
      <description>&lt;P&gt;Thank you very much, now I got it.&lt;BR /&gt;I need to make it a web app since I'm working with Indoors &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 19:16:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-error-runtime-error/m-p/1079383#M41227</guid>
      <dc:creator>LisaHo</dc:creator>
      <dc:date>2021-07-15T19:16:07Z</dc:date>
    </item>
  </channel>
</rss>

