I want to do an Arcade point in polygon intersect. My points ($feature) are in one datastore (SDE database), my polygons (districts) are in another. Is this possible? I also have these feature layers (registered) in our Enterprise environment.
// Create reference to the Districts layer
var districts = FeatureSetByName($datastore,"GIS_Infra.GISADMIN.PARK_P",["NAME"],true)
// Get a feature set of zones that intersect the new POINT
var intersectingDistricts = Intersects(districts, $feature)
Solved! Go to Solution.
A big limitation of Attribute Rules is that they only know about their own database. With eg Popups, you can access external data using the $map global or FeatureSetByPortalID(). None of these work in Attribute Rules, you are limited to $datastore.
A possible workaround seems to be to create a cross-database view of the external feature class in the database backend and register that view with the geodatabase. This way, you could use it in Attribute Rules. I haven't tested this and I doubt this is a supported workflow, so maybe try it in a test environment...
Solved: Access a field value in a layer that is outside th... - Esri Community
An easier solution would be to copy the districts to your database. Districts should be fairly static, so it shouldn't be too much work to keep the copy current. Just have an automated script recopying every night or do it manually every month or so. But of course, this approach clutters your database and introduces data redundancy, which is generally bad...
A big limitation of Attribute Rules is that they only know about their own database. With eg Popups, you can access external data using the $map global or FeatureSetByPortalID(). None of these work in Attribute Rules, you are limited to $datastore.
A possible workaround seems to be to create a cross-database view of the external feature class in the database backend and register that view with the geodatabase. This way, you could use it in Attribute Rules. I haven't tested this and I doubt this is a supported workflow, so maybe try it in a test environment...
Solved: Access a field value in a layer that is outside th... - Esri Community
An easier solution would be to copy the districts to your database. Districts should be fairly static, so it shouldn't be too much work to keep the copy current. Just have an automated script recopying every night or do it manually every month or so. But of course, this approach clutters your database and introduces data redundancy, which is generally bad...
Nice reply. I like the view idea but I think I will just write an automated arcpy script with a spatial join or update curser to get the district.