<?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: Help with Arcade Expression in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/help-with-arcade-expression/m-p/578329#M28991</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works properly in the &lt;A href="https://developers.arcgis.com/arcade/playground/" rel="nofollow noopener noreferrer" target="_blank"&gt;Arcade playground&lt;/A&gt;, changing the various permutations of true and false&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var Jane_current = true;
var Jane_increased = true;

var both_Janes = Iif(Jane_current &amp;amp;&amp;amp; Jane_increased,true,false)

When(both_Janes == true,'This location can be reached by Jane using the current and increased frequency schedules.',
Jane_current == true,'This location can be reached by Jane using the current public transportation schedules.',
Jane_increased == true,'This location can be reached by Jane using the increased frequency schedule.','This location cannot be reached by public transportation.')‍‍‍‍‍‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:51:03 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2021-12-12T00:51:03Z</dc:date>
    <item>
      <title>Help with Arcade Expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-with-arcade-expression/m-p/578325#M28987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a map with two polygon layers and a point layer. One polygon layer is isochrones representing how far someone can go on public transit using current schedules. The second polygon layer is isochrones representing how far someone can go with increased frequency. The point layer contains points of interest. Some of these points can be reached by both polygons, some are only reached by one polygon, and some are not reached by either polygon. I'm trying to build an expression that I can use in the pop-up that will tell the viewer if that point can be reached using the current schedule, the increased frequency schedule, both, or neither. Below is the expression:&lt;/P&gt;&lt;P&gt;&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; current &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$map&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Jane with Current Schedules"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; increased &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureSetByName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$map&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Jane with High Frequency"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; Jane_current &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Intersects&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;current&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; Jane_increased &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Intersects&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;increased&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; both_Janes &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Iif&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Jane_current &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; Jane_increased&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'true'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'false'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="token function"&gt;When&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;both_Janes &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'true'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'This location can be reached by Jane using the current and increased frequency schedules.'&lt;/SPAN&gt;
Jane_current &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'This location can be reached by Jane using the current public transportation schedules.'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
Jane_increased &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'This location can be reached by Jane using the increased frequency schedule.'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'This location cannot be reached by public transportation.'&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to run this, I get the following error:&amp;nbsp;&lt;SPAN class="" style="color: #de2900; background-color: rgba(255, 255, 255, 0.8);"&gt;Parse Error:&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: rgba(255, 255, 255, 0.8);"&gt;Line 9: Unexpected identifier&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If I put a Count function around the intersects, it returns the correct count, so I'm confused why I'm getting an error on Line 9 when I call Jane_current in the When function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:50:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-with-arcade-expression/m-p/578325#M28987</guid>
      <dc:creator>Miguel-Fernandez</dc:creator>
      <dc:date>2021-12-12T00:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Arcade Expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-with-arcade-expression/m-p/578326#M28988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're missing a comma at the end of this line&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="token function"&gt;When&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;both_Janes &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'true'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'This location can be reached by Jane using the current and increased frequency schedules.'&lt;/SPAN&gt;‍
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:51:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-with-arcade-expression/m-p/578326#M28988</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-12T00:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Arcade Expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-with-arcade-expression/m-p/578327#M28989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ken,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for spotting that!! I can't tell you how many times I went through this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2019 18:15:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-with-arcade-expression/m-p/578327#M28989</guid>
      <dc:creator>Miguel-Fernandez</dc:creator>
      <dc:date>2019-03-18T18:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Arcade Expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-with-arcade-expression/m-p/578328#M28990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will say that my expression does not produce the desired results. All points say that "This location cannot be reached by public transportation." So if you come across this post and know what might be causing that, feel free to let me know!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2019 20:56:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-with-arcade-expression/m-p/578328#M28990</guid>
      <dc:creator>Miguel-Fernandez</dc:creator>
      <dc:date>2019-03-18T20:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Arcade Expression</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-with-arcade-expression/m-p/578329#M28991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works properly in the &lt;A href="https://developers.arcgis.com/arcade/playground/" rel="nofollow noopener noreferrer" target="_blank"&gt;Arcade playground&lt;/A&gt;, changing the various permutations of true and false&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var Jane_current = true;
var Jane_increased = true;

var both_Janes = Iif(Jane_current &amp;amp;&amp;amp; Jane_increased,true,false)

When(both_Janes == true,'This location can be reached by Jane using the current and increased frequency schedules.',
Jane_current == true,'This location can be reached by Jane using the current public transportation schedules.',
Jane_increased == true,'This location can be reached by Jane using the increased frequency schedule.','This location cannot be reached by public transportation.')‍‍‍‍‍‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:51:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-with-arcade-expression/m-p/578329#M28991</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-12T00:51:03Z</dc:date>
    </item>
  </channel>
</rss>

