<?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:  Create Filter On Buffer &amp;amp; Intersect of Feature in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1171239#M45921</link>
    <description>&lt;P&gt;Thanks for that info, didn't know!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 18:24:19 GMT</pubDate>
    <dc:creator>ArmstKP</dc:creator>
    <dc:date>2022-05-05T18:24:19Z</dc:date>
    <item>
      <title>Arcade:  Create Filter On Buffer &amp; Intersect of Feature</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1171161#M45903</link>
      <description>&lt;P&gt;I have a bench layer for example.&amp;nbsp; Two of the fields are {Park_Name} and {condition_score}&lt;/P&gt;&lt;P&gt;I am trying to write an expression that shows me the average bench score in the park, where I clicked on that bench.&lt;/P&gt;&lt;P&gt;I at least have this built so far:&lt;/P&gt;&lt;P&gt;var benchBuff = Buffer($feature, 3000, 'foot')&lt;/P&gt;&lt;P&gt;var benchWithin = Intersects(benchBuff, $layer)&lt;/P&gt;&lt;P&gt;return Round(Average(benchWithin, "condition_score"), 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just not sure how or where to include the {Park_Name} filter and/or sql variable in the expression?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 16:51:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1171161#M45903</guid>
      <dc:creator>ArmstKP</dc:creator>
      <dc:date>2022-05-05T16:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade:  Create Filter On Buffer &amp; Intersect of Feature</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1171195#M45914</link>
      <description>&lt;P&gt;You just need the output limited to benches in the same park? You can filter the layer earlier in the expression by attribute, and then use those filtered features in your Intersects function&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var park_benches = Filter($layer, `Park_Name = '${$feature['Park_Name']}'`)

var benchBuff = Buffer($feature, 3000, 'foot')

var benchWithin = Intersects(benchBuff, park_benches)

return Round(Average(benchWithin, "condition_score"), 1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 17:31:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1171195#M45914</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-05-05T17:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade:  Create Filter On Buffer &amp; Intersect of Feature</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1171222#M45919</link>
      <description>&lt;P&gt;Thank you very much Josh!&lt;/P&gt;&lt;P&gt;I have a question about two of the characters I have pictured below.&amp;nbsp; What are these?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArmstKP_0-1651773719917.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/40713i3F70EF0C8634A166/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArmstKP_0-1651773719917.png" alt="ArmstKP_0-1651773719917.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 18:02:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1171222#M45919</guid>
      <dc:creator>ArmstKP</dc:creator>
      <dc:date>2022-05-05T18:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade:  Create Filter On Buffer &amp; Intersect of Feature</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1171234#M45920</link>
      <description>&lt;P&gt;Ah, those are called&amp;nbsp;&lt;STRONG&gt;backticks&lt;/STRONG&gt;. You use them in Arcade (and other programming languages)&amp;nbsp; to create&amp;nbsp;&lt;STRONG&gt;template literals&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Suppose you had two variables you wanted to pipe into some text. You could just concatenate the text like this:&lt;/P&gt;&lt;PRE&gt;var x = 'something'&lt;BR /&gt;var y = 'something else'&lt;BR /&gt;&lt;BR /&gt;'Variable x is ' + x + ', and variable y is ' + y + '.'&lt;/PRE&gt;&lt;P&gt;returns:&lt;/P&gt;&lt;PRE&gt;'Variable x is something, and variable y is something else.'&lt;/PRE&gt;&lt;P&gt;But a template literal inserts the variables directly into the string.&lt;/P&gt;&lt;PRE&gt;`Variable x is ${x}, and variable y is ${y}.`&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both work, but I personally prefer the backtick style, as I find it easier to use and visualize the resulting string.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 18:13:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1171234#M45920</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-05-05T18:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade:  Create Filter On Buffer &amp; Intersect of Feature</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1171239#M45921</link>
      <description>&lt;P&gt;Thanks for that info, didn't know!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 18:24:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1171239#M45921</guid>
      <dc:creator>ArmstKP</dc:creator>
      <dc:date>2022-05-05T18:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade:  Create Filter On Buffer &amp; Intersect of Feature</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1248878#M49819</link>
      <description>&lt;P&gt;I know this post isn't "fresh", but I wanted to thank you for that first line of code in the solution. Fantastic!&amp;nbsp; I knew I had used an attribute of $feature in a filter before, but I couldn't remember the syntax and finding it online is close to impossible...maybe I'm Google search challenged.&amp;nbsp; Finally, I tripped over it here (probably where I stole it from the first time I did it).&amp;nbsp; Man, could Esri have come up with a more convoluted syntax?...&amp;nbsp; Tildes, single quotes, 2 dollar signs, and every kind of bracket....Yikes.&amp;nbsp; Thank you for figuring this out for all of us.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 20:58:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-create-filter-on-buffer-amp-intersect-of/m-p/1248878#M49819</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2023-01-17T20:58:58Z</dc:date>
    </item>
  </channel>
</rss>

