Filter date ranges in related tables

02-16-2023 10:16 AM
Labels (2)
New Contributor III

Hello all, having trouble with something that seems as if it would be fairly simple, but it has escaped me completely.

I am trying to filter dates from a related table in a dashboard popups. I can set a filter in the map, however when I click on the item, the popup still shows all dates.  

I am using an arcade expression inthe popup but my experience with arcade is limited and unsure if that is the culprit or not. (see working example below).  Should I add the filter to the expression or is there something simpler I have overlooked?  Attached a schema screen shot.  Any help would be appreciated, thanks in advance.

var relRec = orderby(FeatureSetByRelationshipName($feature,"Collections"), "FinishTime DES");
var cnt = Count(relRec);
var relatedInfo = "";
if (cnt>0) { var info = First(relRec);
relatedInfo = Text(ToLocal(info.FinishTime),"MM/DD/Y");
} else relatedInfo="None To Date";

return relatedInfo;


0 Kudos
0 Replies