<?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 General Function Failure and Sporadic Selection Highlighting in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021265#M36554</link>
    <description>&lt;P&gt;Hmm, I just checked, and they're both in WGS 1984, as is the data frame.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jan 2021 21:25:47 GMT</pubDate>
    <dc:creator>DeniseBeckham</dc:creator>
    <dc:date>2021-01-28T21:25:47Z</dc:date>
    <item>
      <title>Arcade Expression General Function Failure and Sporadic Selection Highlighting</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021222#M36543</link>
      <description>&lt;P&gt;I am trying to customize the pop-up of a polygon layer in ArcGIS Pro with an arcade expression.&amp;nbsp; I am working on a request to change inspection boundaries to transfer about 200 inspections from one district to another, so I want to create an expression that will show me how many inspection points intersect each district.&amp;nbsp; I successfully used the following code in the &lt;A href="https://developers.arcgis.com/arcade/playground/" target="_self"&gt;Arcade Playground&lt;/A&gt;:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var parcels = FeatureSetByName($map, "Parcels_And_Buildings - Tax Parcels") 
var parcelIntersect = Intersects($feature, parcels)
var parcelCount = Count(parcelIntersect)
return parcelCount&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I tried to add it as an expression for the pop-up of the inspection layer (with appropriate adaptations), I got the message&amp;nbsp;"Invalid expression. Error on line 3. General function failure."&amp;nbsp;&lt;/P&gt;&lt;P&gt;Going off of the message, it sounds like there is a problem with the count function. (I had originally nested the functions inside each other and then separated them to try to isolate the problem.)&amp;nbsp; Has anybody else had a problem like this that they were able to solve? Could it be because there are roughly 600 points intersecting the polygon?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also selected one of the districts and then tried doing a select by location on the points for the selected district.&amp;nbsp; By comparing the results to what I got in ArcMap, I think it selected all the right points, but for some reason, the highlights are all over the place.&amp;nbsp; It's really odd, because when I tell it to zoom to the selection, it zooms in to the selected district, but it doesn't show any of the points as being highlighted anymore.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Point highlights are scattered everywhere instead of being inside the selected district" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4828i1062AB68AF31AC77/image-size/large?v=v2&amp;amp;px=999" role="button" title="SelectByLocation.png" alt="Point highlights are scattered everywhere instead of being inside the selected district" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Point highlights are scattered everywhere instead of being inside the selected district&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am on version 2.7, and I checked to make sure that I have the most current version.&amp;nbsp; The points are being pulled from a SQL view.&amp;nbsp; I am still adjusting to Pro.&amp;nbsp; I've been trying to switch over, but if I can't get these issues straightened out, I guess I'll have to go back to ArcMap for this project.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 20:03:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021222#M36543</guid>
      <dc:creator>DeniseBeckham</dc:creator>
      <dc:date>2021-01-28T20:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression General Function Failure and Sporadic Selection Highlighting</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021243#M36546</link>
      <description>&lt;P&gt;Are these layers coming from a hosted feature service?&lt;/P&gt;&lt;P&gt;When I attempt a similar expression with features hosted in my own portal / server, I get a network error at the point in my expression when I call the &lt;STRONG&gt;Count&lt;/STRONG&gt; function.&lt;/P&gt;&lt;P&gt;When attempting with file-based feature classes, however, the expression evaluates fine.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jCarlson_0-1611865774448.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4836iE23E7E4C8409E953/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jCarlson_0-1611865774448.png" alt="jCarlson_0-1611865774448.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps someone on ESRI staff can confirm, but I would guess that there is a mismatch between what the &lt;STRONG&gt;Count&lt;/STRONG&gt; function does in 2.7 and what prior portal versions do, such that the command cannot return successfully.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 20:31:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021243#M36546</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-01-28T20:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression General Function Failure and Sporadic Selection Highlighting</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021258#M36551</link>
      <description>&lt;P&gt;Hi Josh,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The layers I'm using are not services.&amp;nbsp; The district polygons are coming from a file geodatabase, and the points are coming straight from a SQL database.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Denise&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:16:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021258#M36551</guid>
      <dc:creator>DeniseBeckham</dc:creator>
      <dc:date>2021-01-28T21:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression General Function Failure and Sporadic Selection Highlighting</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021261#M36552</link>
      <description>&lt;P&gt;Very curious! Is there a difference in projection or datum between the two?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:19:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021261#M36552</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-01-28T21:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression General Function Failure and Sporadic Selection Highlighting</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021265#M36554</link>
      <description>&lt;P&gt;Hmm, I just checked, and they're both in WGS 1984, as is the data frame.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:25:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021265#M36554</guid>
      <dc:creator>DeniseBeckham</dc:creator>
      <dc:date>2021-01-28T21:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression General Function Failure and Sporadic Selection Highlighting</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021269#M36555</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/231667"&gt;@DeniseBeckham&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only reason I can come up with to have this type of selection behavior would be multi point features. If possible could you export a selection of the SQL database point to a local FGDB and try if it provides the same selection result?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:28:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021269#M36555</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-01-28T21:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression General Function Failure and Sporadic Selection Highlighting</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021301#M36560</link>
      <description>&lt;P&gt;Hello Xander,&amp;nbsp;&lt;/P&gt;&lt;P&gt;There aren't any multipoint features in this layer.&amp;nbsp; It's coming from a view that our programmer made that pulls from about 5 different tables.&amp;nbsp; The locations are created from the lat/long values in one of the tables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you suggested, I selected some of the points and exported them.&amp;nbsp; I selected a rectangle on the map, and the highlights were all over the place again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Selection highlights are scattered even though I selected with a rectangle" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4848i0771FD1D8957C93C/image-size/large?v=v2&amp;amp;px=999" role="button" title="PointSelection.png" alt="Selection highlights are scattered even though I selected with a rectangle" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Selection highlights are scattered even though I selected with a rectangle&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, when I exported them into the project geodatabase, all the points in the resulting feature class were within the rectangle I drew.&amp;nbsp; And when I selected by location from my export, the highlights also showed up properly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="The points exported were all within the rectangle I drew, and the selection highlighted properly" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4849iE6BBC3E3544194A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="PointExport.png" alt="The points exported were all within the rectangle I drew, and the selection highlighted properly" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;The points exported were all within the rectangle I drew, and the selection highlighted properly&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Furthermore, I just tried my arcade expression again.&amp;nbsp; I changed it to reference the points I exported, and it worked perfectly! I'm now really confused as to why it won't work with the live data.&amp;nbsp; I'd hate to have to export all the points every time I want to use arcade expressions when I'm working with SQL data in Pro. The view is a little slow. Could that have something to do with it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Denise&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 22:08:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021301#M36560</guid>
      <dc:creator>DeniseBeckham</dc:creator>
      <dc:date>2021-01-28T22:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression General Function Failure and Sporadic Selection Highlighting</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021307#M36561</link>
      <description>&lt;P&gt;Double check the view query, if you have access to the SQL behind it. It sounds like maybe it doesn't a consistent unique identifier column to reference, so when it selects "ObjectID 100", there might be multiple that it's grabbing by mistake.&lt;/P&gt;&lt;P&gt;If you have access to the database, you could also add the points as a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/what-is-a-query-layer-.htm" target="_self"&gt;&lt;STRONG&gt;Query Layer&lt;/STRONG&gt;&lt;/A&gt; so that Pro can validate the SQL beforehand, and select multiple columns as unique identifiers.&lt;/P&gt;&lt;P&gt;When you export those features, it would have created its own internal ObjectID to uniquely identify rows in the exported feature class, which might explain the difference.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 22:14:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021307#M36561</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-01-28T22:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression General Function Failure and Sporadic Selection Highlighting</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021350#M36572</link>
      <description>&lt;P&gt;Hi Josh,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do have access to the SQL database.&amp;nbsp; The layer in Pro uses the RECORD_ID field (which is a string of two letters followed by 7 numbers) as the unique identifier column.&amp;nbsp; I did a few different simple queries of the view in SQL and confirmed that the Record IDs are definitely unique in this view.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried adding a new query layer from the Add Data button on the ribbon and selected fewer columns.&amp;nbsp; I made sure to choose the RECORD_ID column as the unique identifier, but the new layer exhibited the same unexpected highlighting behavior and the arcade expression didn't work when I referenced the new layer. As I mentioned earlier, select by location works perfectly fine on the exact same view in ArcMap.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Denise&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 23:35:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-general-function-failure-and/m-p/1021350#M36572</guid>
      <dc:creator>DeniseBeckham</dc:creator>
      <dc:date>2021-01-28T23:35:28Z</dc:date>
    </item>
  </channel>
</rss>

