Hello!
I have an Arcade expression which returns values from a related table within a popup. It works great except that it returns every value in the 1:M relationship, so there are many duplicates. Is it possible to modify my expression to only return the distinct values from the related records? Any help is appreciated.
My expression
var fs = FeatureSetByName($map, "RELATED TABLE" , ['*'], false);
var result = "";
var cnt = Count(fs);
if (cnt > 0) {
// start loop through related records
for (var f in fs) {
// for each f (=feature) in related features, add attendee to the result
result += TextFormatting.NewLine + f.FIELDRETURNED;
}
} else {
// overwrite result with text to indicate that there are no attendees
result = "";
}
return result;Thanks!