Hi there,
I am new to Arcade programming and I have a simple question:
This is a standard scenario: I have created a feature point layer and a related table for use in Field Maps. This is a one-to-many relationship. Someone has gone out and collected multiple records for each point.
In Map Viewer, I would like the pop-up for the point layer to display the number of records for that point.
In the point layer's pop-up configuration I enter the following expression:
var relRecord = FeatureSetByRelationshipName($feature, "Rel_table");var cnt = Count(relRecord);return cnt;
When I click on any point the total number of records is always 1, even though there are always more than one.
Thank you for the help.
Hmm, does it work if you filter the related table yourself?
var rel_fs = FeaturesetByPortalItem(...)
var common_val = $feature.CommonField
var rel_rows = Filter(rel_fs, "CommonField = @common_Val")
return Count(rel_rows)
Hi Johannes,
Thanks for the suggestion. I tried filtering and still have only the first record returned.