AnsweredAssumed Answered

Arcade Attribute Calc Rule Function "Contains" fails on Server

Question asked by nluusesri-southafrica-esridist Employee on Sep 28, 2020
Latest reply on Sep 30, 2020 by xander_bakker

Good day all.

I think I might have encountered a bug but before reporting it as such I would like to ask if somebody else can replicate this issue.

Context: I have a polygon FC which should count how many points it encloses and return the number upon creation.


Software Version: ArcGIS Pro (2.5.1), ArcGIS Server (10.71)


Arcade Script of Polygon FC: 

var GeopointFS = FeatureSetByName($datastore, "STAGING.LDR.Geo_Frame");
var ContaindPts = Contains($feature, GeopointFS)
if (ContaindPts < 1) {return null}
if (IsEmpty(ContaindPts)) { return null}
var CntGP = Count(ContaindPts);
return CntGP

This script works perfectly fine when running on FC level, however when publishing and running it using the service I receive the following error on line 2: 

Arcade Error: Geometry type or nulle expected.

On the left, I attempt to add a polygon in ArcGIS Pro using the Feature Service.

On the left I attempt to add a polygon using the Feature Service, on the right using the Feature Class.  The latter works as expected.



From the ArcGIS Arcade version matrix found here, it is indicated that the "Contains" function, which is supported from Arcade verson 1.7 onwards should work on ArcGIS Enterprise server 10.7.1.

Anybody else encountered this yet?



Thanks for your considerations



arcade geometrycontains()attribute-rulesattribute calculation errorarcade 1.7