I'm having issue (not knowing proper Arcade scripting - still learning) trying to return a list of values from a table I am reading in for one of the Attribute Rules. I've done some searching and came up with the expression below. Maybe I'm going at it all wrong. Still learning Arcade.
The table is in the same file geodatabase as my feature class where the AttributeRule is being used.
The table (PROPCODE) has two fields (ParcelID, AssessCode):
PROPCODE
ParcelID | AssessCode |
100 | 301 |
100 | 405 |
100 | 305 |
200 | 301 |
300 | 375 |
300 | 385 |
400 | 301 |
I am trying to do a Calculation with Attribute Rule where if the user digitizes on ParcelID 100, the AR would kick in and read the above table and return 301,305,405. My issue is that it's only returning 301,
Here is the code I am using:
var ExtTable = FeatureSetByName($datastore, 'PROPCODE',['ParcelID','AssessCode'],false);
for (var Parcel in ExtTable) {
if ($feature.CITY_PIN == Parcel.PIN) { //$feature.CITY_PIN is the current record. in the example it is 100.
var ListIt = Concatenate(Parcel.AssessCode, ',');
return ListIt;
}
}
return '000'; //test just check if it returns anything
Any help would be appreciated. Let me know if additional info would help. Thanks!
Running ArcGIS Pro 2.6.3.