<?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 Arcade expression for displaying only selected features in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-displaying-only-selected/m-p/1060511#M40210</link>
    <description>&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;I have a map displaying over 4000 features, each with unique IDs. Out of these 4000 features, I need to display only 250 features with selected unique IDs. Is there a short&amp;nbsp; formula to display only those 250 features.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;List of features id :&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1964004&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1444000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1719002&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1452034&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1618000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1602002&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;2004000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1175000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;2012000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1172002&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1946000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;continues to 250 ids&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;Expression I used:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;var mh = $feature.UNITID;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;if ((mh=="1964004")||(mh=="1444000")||(mh=="1719002")||(mh=="1452034")||(mh=="1618000")||(mh=="1602002")||(mh=="2004000")||(mh=="1175000")||(mh=="2012000")||(mh=="1172002")||(mh=="1946000")){&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;return"selected";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;} else {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;return"";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;This works as intended but I am wondering if there is a short expression where I can just copy the list rather than typing each features in the bracket&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;KA&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 May 2021 17:04:25 GMT</pubDate>
    <dc:creator>KhemAryal</dc:creator>
    <dc:date>2021-05-21T17:04:25Z</dc:date>
    <item>
      <title>Arcade expression for displaying only selected features</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-displaying-only-selected/m-p/1060511#M40210</link>
      <description>&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;I have a map displaying over 4000 features, each with unique IDs. Out of these 4000 features, I need to display only 250 features with selected unique IDs. Is there a short&amp;nbsp; formula to display only those 250 features.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;List of features id :&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1964004&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1444000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1719002&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1452034&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1618000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1602002&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;2004000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1175000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;2012000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1172002&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;1946000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;continues to 250 ids&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;Expression I used:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;var mh = $feature.UNITID;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;if ((mh=="1964004")||(mh=="1444000")||(mh=="1719002")||(mh=="1452034")||(mh=="1618000")||(mh=="1602002")||(mh=="2004000")||(mh=="1175000")||(mh=="2012000")||(mh=="1172002")||(mh=="1946000")){&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;return"selected";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;} else {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;return"";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;This works as intended but I am wondering if there is a short expression where I can just copy the list rather than typing each features in the bracket&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" size="1 2 3 4 5 6 7"&gt;KA&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 17:04:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-displaying-only-selected/m-p/1060511#M40210</guid>
      <dc:creator>KhemAryal</dc:creator>
      <dc:date>2021-05-21T17:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression for displaying only selected features</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-displaying-only-selected/m-p/1060695#M40216</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/150120"&gt;@KhemAryal&lt;/a&gt;&amp;nbsp;I would recommend using &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#includes" target="_blank" rel="noopener"&gt;Includes()&lt;/A&gt;, an array method added at a recent Arcade release.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var mh = $feature.UNITID;
var arr = [4, 7, 8, 900, 23, 4]; // these would be your 250 IDs 
if (Includes(arr, mh)) {
    return "selected"
} else {
    return ""
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 23:43:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-for-displaying-only-selected/m-p/1060695#M40216</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-05-21T23:43:18Z</dc:date>
    </item>
  </channel>
</rss>

