Attribute rules fail when editing through a feature service

334
1
Jump to solution
12-08-2020 11:46 AM
Labels (1)
JimWilliams
New Contributor III

I have set up a attribute rule Calculation that will run on evaluation. I am using a enterprise setup (SQL database, Portal, REST endpoint) I published the data with "reference registered data", "Exclude from application evaluation" enabled, global IDs enabled, schema locking, I have both Map Service and a Feature Service, but I didn't enable versioning or archiving.

All the data is in the same database, but the points are under a Feature dataset and the polygons are not, but they are in the same projection.

This attribute rule evaluates successfully when I am editing normally through a GDB connection, in ArcGIS Pro, but when load our feature service and edit the attributes I get the following error:

Arcade error: Geometry type or null expected
 

I don't think its a geometry error because it runs fine when I don't use a feature service. It seems more like the geometry is not accessible when you use a feature service. 

I have the following Arcade script:

 

 

 

// bring in the data and filter out abandoned valves
var valve_set = filter(featuresetbyname($datastore, 'GasValves', ['OBJECTID', 'WORK_ORDER_STATUS', 'ABNADONEDFLAG'], true), "ABNADONEDFLAG = 0")

// make the query for all closed work orders
var query = "WORK_ORDER_STATUS = 'CLOSED'"
var closed_valve_set = filter(valve_set, query)

//check if query is a empty feature set
if (closed_valve_set != null) {
    // return feature set counts
    var closed_count = count(Intersects($feature, valve_set)) - count(Intersects($feature, closed_valve_set))

    return closed_count
}

// return null if empty quadrant
else { return null }

 

 

 

 

Regards,

Jim

0 Kudos
1 Solution

Accepted Solutions
JimWilliams
New Contributor III

Hello,

Just for information I contacted ESRI support. They were very helpful. They made a new report for this error "BUG-000136553: An Arcade Attribute calculation Rule Function "Intersects" fails on Portal for ArcGIS". This only effects 10.7 servers 10.8 servers do not have the same flaw.

This seems to only happen when using Intersects or Contains Arcade functions on 10.7 servers. 

Hope this helps anyone with the same issue.

View solution in original post

0 Kudos
1 Reply
JimWilliams
New Contributor III

Hello,

Just for information I contacted ESRI support. They were very helpful. They made a new report for this error "BUG-000136553: An Arcade Attribute calculation Rule Function "Intersects" fails on Portal for ArcGIS". This only effects 10.7 servers 10.8 servers do not have the same flaw.

This seems to only happen when using Intersects or Contains Arcade functions on 10.7 servers. 

Hope this helps anyone with the same issue.

View solution in original post

0 Kudos