<?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 Expression - ChatGPT in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1252414#M50003</link>
    <description>&lt;P&gt;That is great feedback Josh! I will definitely dive in on the documentation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really appreciate you going out of your way to help!&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 16:41:28 GMT</pubDate>
    <dc:creator>LoganMayerVM</dc:creator>
    <dc:date>2023-01-27T16:41:28Z</dc:date>
    <item>
      <title>Arcade Expression - ChatGPT</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1252150#M49990</link>
      <description>&lt;P&gt;I am very much a novice with Arcade Expressions and I was hoping someone may be kind enough to help with writing an expression that can calculate the number of miles in a layer ('DART_Bus_Route_KML') do not fall within a 0.25 mile radius of locations on another layer ('billboards').&lt;/P&gt;&lt;P&gt;I thought I'd try to use the technology that everyone raves about, ChatGPT, to help with writing the expression, and it wrote this:&lt;/P&gt;&lt;P&gt;var bus_miles = Length(geometry(DART_Bus_Route_KML))/1609.34;&lt;BR /&gt;var near_billboards = Intersects(geometry(DART_Bus_Route_KML), Buffer(geometry(billboards), 0.25));&lt;BR /&gt;var non_near_bus_miles = Sum(Filter(bus_miles, !near_billboards));&lt;BR /&gt;return non_near_bus_miles;&lt;/P&gt;&lt;P&gt;When running the expression, I get the error message: "&lt;SPAN&gt;Execution error - Line : 1, 32: Identifier not recognised".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any suggestions on where our AI overlord may have made an error in his expression?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks to anyone who may be able to help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 22:17:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1252150#M49990</guid>
      <dc:creator>LoganMayerVM</dc:creator>
      <dc:date>2023-01-26T22:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression - ChatGPT</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1252169#M49991</link>
      <description>&lt;P&gt;That's pretty funny! And not too bad, considering.&lt;/P&gt;&lt;P&gt;To problems are a few:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;"billboards" and "DART_Bus_Route_KML" don't refer to anything. To access layers in an Arcade expression, you need to use a FeatureSet expression of some kind.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Intersects&lt;/STRONG&gt; will return features which intersect in any way with the other feature / featureset. If even a foot of the feature intersected, it would be included, even though the majority of the feature (and thus its linear measurement) fell outside the buffer. You'll need to clip the routes by the buffered geometry, which is possible in Arcade, but not terribly efficient.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Filter &lt;/STRONG&gt;needs a SQL expression as its second parameter&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Sum&lt;/STRONG&gt; needs a field name for which to calculate the sum&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Buffer &lt;/STRONG&gt;needs a units parameter, I think?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Where are you trying to implement this expression? ChatGPT probably doesn't know which Arcade profile you're working in.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 22:52:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1252169#M49991</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-01-26T22:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression - ChatGPT</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1252184#M49992</link>
      <description>&lt;P&gt;Hi Josh! Thanks for the quick reply! I'm probably embarrassing myself here, but I don't think I really know 'where' I'm trying to implement it - or at least I'm not totally understanding the question.&lt;/P&gt;&lt;P&gt;It's in one of my maps on ArcGIS Online (not pro - if that makes a difference). In terms of where the ultimate answer would appear (pop-up, field, etc.), it isn't as important to me as just figuring out the number of miles that don't fall within the 0.25 miles.&lt;/P&gt;&lt;P&gt;Is there a better way of clipping the route without using Arcade?&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will probably be the only time I end up using a feature like this but I may end up just going through the online course because based on your feedback, here is my poor attempt at trying to update the expression (at least based on my interpretation of your first few notes).&lt;/P&gt;&lt;P&gt;var bus_miles = Length(geometry($featureDART_Bus_Route_KML))/1609.34;&lt;BR /&gt;var near_billboards = Intersects(geometry($featureDART_Bus_Route_KML), Buffer(geometry($layerbillboards), 0.25));&lt;BR /&gt;var non_near_bus_miles = Sum(Filter(bus_miles, !near_billboards));&lt;BR /&gt;return non_near_bus_miles;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 23:23:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1252184#M49992</guid>
      <dc:creator>LoganMayerVM</dc:creator>
      <dc:date>2023-01-26T23:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression - ChatGPT</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1252308#M49993</link>
      <description>&lt;P&gt;I asked because Arcade has &lt;A href="https://developers.arcgis.com/arcade/profiles/" target="_blank"&gt;different profiles&lt;/A&gt;, each with different capabilities, so it does matter.&lt;/P&gt;&lt;P&gt;But honestly, unless you need the output of this expression to dynamically adjust to live data, you're probably better off just performing an actual analysis workflow, buffering and clipping the layers.&lt;/P&gt;&lt;P&gt;If you're doing this entirely in AGOL, &lt;A href="https://doc.arcgis.com/en/arcgis-online/analyze/perform-analysis.htm" target="_blank"&gt;check out the documentation&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 13:24:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1252308#M49993</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-01-27T13:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression - ChatGPT</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1252414#M50003</link>
      <description>&lt;P&gt;That is great feedback Josh! I will definitely dive in on the documentation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really appreciate you going out of your way to help!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 16:41:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1252414#M50003</guid>
      <dc:creator>LoganMayerVM</dc:creator>
      <dc:date>2023-01-27T16:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression - ChatGPT</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1253005#M50021</link>
      <description>&lt;P&gt;Great idea using ChatGPT!&amp;nbsp; I just tried it for some labeling help and it sort of worked, but it definitely was better than google : )&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 18:35:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-chatgpt/m-p/1253005#M50021</guid>
      <dc:creator>DavidForbuss1</dc:creator>
      <dc:date>2023-01-30T18:35:29Z</dc:date>
    </item>
  </channel>
</rss>

