I'm setting up an incident reporting app for our security department. We'll be logging incidents at schools as points. We have geofences around each school, and we'd like to be able to auto populate the school name from the geofence in the school name field in the incident point that's being created within that geofence. Would I be able to accomplish this with an Arcade expression?
Hi @LeviCecil,
That workflow is very possible using a calculated expression in a smart form and Arcade.
Check out the first example in this blog post for guidance on how to do it: https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-fo...
I hope that helps!
Chris
Ah great! Thank you!
Hi Chris, I've revisited this and it's working. The problem I'm running into is that I want the field to still be editable if someone is making a report and they aren't in the site's geofence in Field Maps. Is there a way to make it calculated, but also editable?
Here is my expression
var geofence = FeatureSetByName($map, "Security_Geofences",['Site'])
var site = First(Intersects($feature, geofence))
if (!IsEmpty(site)) {
return site['Site']
} else {
return null
}