Hello,
Was wondering if anyone has worked on field calculations (In Arcade Expressions) on hosted feature layers in ArcGIS Pro. I wanted to grab the the field value of a polygon layer that intersects another and transfer that value over into the other layers field. I have used the following formula:
// load the point featureclass
var points = FeatureSetByName($datastore, "Shelter_Zones", ["*"], true)
// get the points inside the current polygon feature
var points_in_polygon = Contains($feature, points)
// count them and return the number
return Count(points_in_polygon)
I was successful in running this feature when they were native layers created in ArcGIS Pro but cannot get it to run with hosted feature layers. I get the following error:
Invalid expression.
Error on line 2.
Table not found Shelter_Zones
I read somewhere that is has to do with first parameter after the function FeatureSetByName. I am assuming this is where the formula is referencing the origin point for the data. My guess is that $datastore is saying the values are held in ArcGIS Pro when they are not. I have tried $map with no success either.
Has anyone else run into this issue and if so how they you guys resolve this?
Many thanks in advance for any help!