Select to view content in your preferred language

Attribute Rule to calculate Property ID for Meter record

546
3
03-16-2023 11:23 PM
EstherSmith_Dev
Occasional Contributor

Hi,

I have a requirement to populate ElectricDevice (type Service Meter) record in Utility Network with the ID of the property it falls into. I thought I could use FeatureSetByName and Interects. However, FeatureSetByName ($map, <layer>) expects the layer to be in a same feature service. I cannot include property layer in the UN service. Is there any other way like FeatureSetByURL?

Cheers,

 

 

 

Tags (2)
0 Kudos
3 Replies
MikeMillerGIS
Esri Frequent Contributor

If the class is in the same database, you can use $datastore instead of $map

https://developers.arcgis.com/arcade/function-reference/featureset_functions/#featuresetbyname

  • featureSetCollection: FeatureSetCollection - The map or feature service containing one or more layers from which to create a FeatureSet. Typically, this value is the $map or $datastore global.

The other option is use a portal lookup to access another feature service

https://developers.arcgis.com/arcade/function-reference/portal_functions/

 

0 Kudos
EstherSmith_Dev
Occasional Contributor
0 Kudos
HusseinNasser2
Esri Contributor

If you use FeatureSetByname with $datastore and exclude the rule from application evaluation, the rule should work on the server as long as the container (assembly I assume?) is in the workspace which it should be in case of the UN.

 

if those are related with containment associations you can use FeatureSetByAssociation 

https://www.esri.com/arcgis-blog/products/utility-network/data-management/featuresetbyassocaitions-n...