HOW TO
This article outlines a method for populating a field in a feature class in ArcGIS Pro by leveraging data from a related table. This is achieved using the Calculate Field geoprocessing tool in conjunction with an Arcade expression. This approach is particularly useful when it is necessary to transfer or combine information from a one-to-many or many-to-one related table relationship directly into your primary feature class.
To calculate a field using values from a related table, follow these steps:
var fsn = FeatureSetByName($datastore, 'name of your related table', ["*"], false);
var temp = "";
for (var j in fsn){
if ($feature.Primary_key_name == j.Foreign_key_name){
temp = temp + j.Field_1 + " "+ j.Field_2+ " "}
}
return temp
Note:
In the above expression:
Article ID: 000036851
Get help from ArcGIS experts
Start chatting now