<?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: Alternative to First in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/alternative-to-first/m-p/1090839#M186</link>
    <description>&lt;P&gt;That statement is correct and should work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s. it is not Arcade, it is SQL.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Aug 2021 16:05:56 GMT</pubDate>
    <dc:creator>HusseinNasser2</dc:creator>
    <dc:date>2021-08-20T16:05:56Z</dc:date>
    <item>
      <title>Alternative to First</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/alternative-to-first/m-p/1090199#M176</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a rule where I am trying to see if a line intersects a specific polygon. I was using First, but realized the rule wouldn't flag if it went through another polygon first,&amp;nbsp;&lt;EM&gt;then&amp;nbsp;&lt;/EM&gt;intersected my flag polygon. Is there a way to return a list and then flag if my polygon(cab_id == 'SDY-HUT') is in that list? This is the code I am using.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var cabs = FeatureSetByName($datastore, "Proposed_OLT_LCP_Boundaries_copy", ["cab_id"])

var cabsInt = Intersects(cabs, $feature)

var cabSpliceInt = First(cabsInt)

if (cabSpliceInt == null) return {"errorMessage": "Please edit inside a cabinet boundary"}

if (cabSpliceInt.cab_id == 'SDY-HUT')

return false;

else return true;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 23:44:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/alternative-to-first/m-p/1090199#M176</guid>
      <dc:creator>ChrisGAEG</dc:creator>
      <dc:date>2021-08-18T23:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative to First</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/alternative-to-first/m-p/1090252#M178</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var cabs = FeatureSetByName($datastore, "Proposed_OLT_LCP_Boundaries_copy", ["cab_id"])
var cabsInt = Intersects(cabs, $feature)
// just check the intersected feature set
if (cabsInt == null || Count(cabsInt) == 0) {
  return {"errorMessage": "Please edit inside a cabinet boundary"}
}
// filter cabsInt for your flagged polygon
var sdy_hut = First(Filter(cabsInt, "cab_id = 'SDY-HUT'"))
if (sdy_hut == null) {
  return false
}
return true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 05:36:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/alternative-to-first/m-p/1090252#M178</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-08-19T05:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative to First</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/alternative-to-first/m-p/1090817#M184</link>
      <description>&lt;P&gt;You can continue using first but first (no pun) you have to add an additional filter against the polygon you want. Push the query all the way to the DB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var cabs = FeatureSetByName($datastore, "Proposed_OLT_LCP_Boundaries_copy", ["cab_id"], false)

var filteredCabs = filter(cabs, "cab_id='SDY-HUT'")
var cabsInt = Intersects(filteredCabs , $feature)

var cabSpliceInt = First(cabsInt)

if (cabSpliceInt == null) return {"errorMessage": "Please edit inside a cabinet boundary"}
 
 return true;
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 15:14:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/alternative-to-first/m-p/1090817#M184</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2021-08-20T15:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative to First</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/alternative-to-first/m-p/1090838#M185</link>
      <description>&lt;P&gt;Okay great, this makes sense. What is the syntax for using a list in this case? What is the Arcade equivalent of "IN"? I want to do something like the following -&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var filteredCabs = filter(cabs, "cab_id IN ('SDY-HUT', 'ESC-C02', 'ESC-C04')")&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 Aug 2021 16:00:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/alternative-to-first/m-p/1090838#M185</guid>
      <dc:creator>ChrisGAEG</dc:creator>
      <dc:date>2021-08-20T16:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative to First</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/alternative-to-first/m-p/1090839#M186</link>
      <description>&lt;P&gt;That statement is correct and should work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p.s. it is not Arcade, it is SQL.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 16:05:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/alternative-to-first/m-p/1090839#M186</guid>
      <dc:creator>HusseinNasser2</dc:creator>
      <dc:date>2021-08-20T16:05:56Z</dc:date>
    </item>
  </channel>
</rss>

