<?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 for Webmap - When Function Weirdness in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-for-webmap-when-function-weirdness/m-p/1209808#M47725</link>
    <description>&lt;P&gt;Well now I feel stupid... Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2022 11:52:44 GMT</pubDate>
    <dc:creator>LiamHarrington-Missin</dc:creator>
    <dc:date>2022-09-06T11:52:44Z</dc:date>
    <item>
      <title>Arcade for Webmap - When Function Weirdness</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-for-webmap-when-function-weirdness/m-p/1209789#M47721</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got stuck and I can't work out why.&amp;nbsp; My workflow is as follows - a user in the field captures some data and I want to use Arcade to classify that data to create improved visuals.&amp;nbsp; I've written a When statement which appears to be working in the sandpit but once it goes to the map, the value fails to materialise....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiamHarringtonMissin_1-1662459123553.png" style="width: 241px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50479i7870B741ACA991EC/image-dimensions/241x216?v=v2" width="241" height="216" role="button" title="LiamHarringtonMissin_1-1662459123553.png" alt="LiamHarringtonMissin_1-1662459123553.png" /&gt;&lt;/span&gt;&amp;nbsp;appears to work, but...&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LiamHarringtonMissin_2-1662459407399.png" style="width: 220px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50480i147E005C5688CB1E/image-dimensions/220x116?v=v2" width="220" height="116" role="button" title="LiamHarringtonMissin_2-1662459407399.png" alt="LiamHarringtonMissin_2-1662459407399.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Nothing appears in the popup?&amp;nbsp; I should be getting a VL at the very least.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;// Calculate the width category
var width_cat = when(
    $feature.WIDTH&amp;lt;=0.5,'VN',
    $feature.WIDTH&amp;lt;=1,'N',
    $feature.WIDTH&amp;lt;=2,'M',
    'W')

// Extract Oil Distribution to make following coding easier
var oilDist = $feature["OIL_DIST"]

// Calculate the Initial Ranking
var ranking = when(
    oilDist=='SP'&amp;amp;&amp;amp;width=='M','L',
    oilDist=='SP'&amp;amp;&amp;amp;width=='W','L',
    oilDist=='PT'&amp;amp;&amp;amp;width=='N','L',
    oilDist=='PT'&amp;amp;&amp;amp;width=='M','M',
    oilDist=='PT'&amp;amp;&amp;amp;width=='W','M',
    oilDist=='BR'&amp;amp;&amp;amp;width=='VN','L',
    oilDist=='BR'&amp;amp;&amp;amp;width=='N','M',
    oilDist=='BR'&amp;amp;&amp;amp;width=='W','H',
    oilDist=='CN'&amp;amp;&amp;amp;width=='VN','L',
    oilDist=='CN'&amp;amp;&amp;amp;width=='N','M',
    oilDist=='CN'&amp;amp;&amp;amp;width=='M','H',
    oilDist=='CN'&amp;amp;&amp;amp;width=='W','H',
    'VL')

Console('Width',$feature.WIDTH,'width_cat: ', width_cat,'oilDist: ', oilDist)
return ranking&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone any ideas?&amp;nbsp; Do you get the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 10:17:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-for-webmap-when-function-weirdness/m-p/1209789#M47721</guid>
      <dc:creator>LiamHarrington-Missin</dc:creator>
      <dc:date>2022-09-06T10:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade for Webmap - When Function Weirdness</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-for-webmap-when-function-weirdness/m-p/1209795#M47722</link>
      <description>&lt;P&gt;Your variable is named &lt;STRONG&gt;width_cat&lt;/STRONG&gt;, but you're using &lt;STRONG&gt;width&lt;/STRONG&gt; in the When() function.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 11:02:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-for-webmap-when-function-weirdness/m-p/1209795#M47722</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-09-06T11:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade for Webmap - When Function Weirdness</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-for-webmap-when-function-weirdness/m-p/1209808#M47725</link>
      <description>&lt;P&gt;Well now I feel stupid... Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 11:52:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-for-webmap-when-function-weirdness/m-p/1209808#M47725</guid>
      <dc:creator>LiamHarrington-Missin</dc:creator>
      <dc:date>2022-09-06T11:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade for Webmap - When Function Weirdness</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-for-webmap-when-function-weirdness/m-p/1209843#M47728</link>
      <description>&lt;P&gt;Ha, that's no reason to feel stupid! I've misnamed or misspelled variables so often that it's one of the first things I look for, now...&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 13:37:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-for-webmap-when-function-weirdness/m-p/1209843#M47728</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-09-06T13:37:03Z</dc:date>
    </item>
  </channel>
</rss>

