AnsweredAssumed Answered

Can feature service be used as parameter in Attribute rule?

Question asked by tpcolson Champion on Jan 16, 2020
Latest reply on Jan 16, 2020 by xander_bakker

With the following, I get an error. Is it even possible to use a feature service as an input in an attribute rule? What I'm trying to do is calculate a value on insert/update based on the intersecting value from the feature service. 


var fsPolyBoundary =  FeatureSetByName($datastore, "", ["GRTS_ID "], true)
var fsPoly = Intersects(fsPolyBoundary, Geometry($feature))
var loc = First (fsPoly)

var name  = ""
if (loc == null)
   return  {"errorMessage": "Point must be created in a Grid."}
   name =  loc.LOC_NAME

return name + " - " + $feature.LOC_NAME;