We have recently made the move to ArcGIS Pro for everything except our 911 Addressing. We are searching for an Attribute rule that would allow us to take attribute data from several polygon layers and put them into our address layer. In other words, we want to enter a new address point and have the attribute rule to go out and find certain data (ESN, Community, Senate, House, JP District, etc.) and enter that into our Address layer. We were able to do this in ArcGIS Desktop using a script but that script will not work in Attribute rules. Unfortunately, I do not understand Arcade and I'm pretty limited with vbscript. I'm hoping that there is someone out there that has built something like this that would share it with me.
Thank You all in advance.
Solved! Go to Solution.
I am trying to do the same thing by pulling an attribute from an intersecting layer but I am receiving an error that the $datastore identifier is not found. Is there additional set up on the service that is required in order to use the $datastore identifier?
Thank you
Hi @TroyGray , I have seen this type of error when the feature set does not have GlobalIDs. Can you validate that it does?
Thanks Xander for the reply. It turns out it was my fault because I didn't have "Feature Access" enabled on the service. Once I enabled "Feature Access" the $datastore, $map, etc. appeared in the Arcade window and is working great. Thanks again
So as far as you know there is no way to do this between datastores? Our points are in one database but our polygons are in another? Do you think it may be possible to do this if both feature layers are published to Enterprise?
This is great! Thank you so much for sharing.
Just FYI for anyone who may come after me... I ran this expression as a field calculation on a dataset of over 100,000 features and it took about 2 hours 😅
Perhaps @HusseinNasser2 can weigh in on this....
Wow. This is so frustrating. Since two hours I try to transfer the point number of intersecting Points from layer A to layer B in ArcGIS Pro with Arcade. And maybe I am too stupid. But I cannot understand that if I want to grab another layer in my ArcGIS Pro Map by name, it has to be in the same datastore as the layer I want to update. And $map gives me an Error: Object not found $map.
With QGIS this is so easy! Just: overelay_intersects(layer_name, field_name)
And this is it! No need for globalIDs, no need to be in the same datastore! Nothing! And it is free!
I am completely out of words and so frustrated you cannot imagine!
If you are using an attribute rule or a field calculation, the Arcade expression does not know what the $map is. You need to use $datastore to access the other featureset and there should be no problem to transfer the number of points from layer A to layer B.
@XanderBakkerThank you for the information.
Sorry for not being clear on this. One of my layers is in a Enterprise Geodatabase. The other layer is from ArcGIS Online. So $datastore does not work.
I would be really greatfull for any solution.
Thanks for providing some more details. There might be an issue with getting access to the two layers if they require different users to get access to them. If this s not the case, you could try using something similar to this example below to get access to the featureset:
// Acccess the portal
var spx = Portal('https://utility-esri-co.maps.arcgis.com');
// Provide an optional SQL query
var sql = "Motivo <> ''";
// access the layer in the portal using the item ID
var proyectos = Filter(FeatureSetByPortalItem(spx, 'bf4a31341a5d49be90de6ce471a0b647', 0, ["Motivo"], false), sql);