Select to view content in your preferred language

Attribute Rule

292
0
09-17-2019 07:37 AM
AbiDhakal
Occasional Contributor III

Hello GIS friends,

I have a Point feature class on which I have created an Attribute Rule and published it as a feature service to our GIS Server. The rule is to have the Point feature populate itself with the underlying county name from a County feature layer. The rule works great in Pro, but as a service it is only populating itself with a particular county name regardless of where I create the Point.

This is the Rule:

var fsCounty = FeatureSetByName($datastore, "ALForestry.SDE.County", ["name"])
var fsCountyIntersect = Intersects(fsCounty, $feature)
var County = First(fsCountyIntersect)

if (County ==null) return {"errorMessage":"County not found"}

return County.name

Thank you.

Abi

Tags (1)
0 Kudos
0 Replies