Howdy all, new to Arcade and having a bit of an issue returning text. The expression runs without errors however if there is no record, it does not return "None to Date" as I expected it would...
any help is greatly appreciated (having issues with datediff returns but that'll be a different topic!)
Thanks in advance!
expression as currently written
var relRec = OrderBy(FeatureSetByRelationshipName($feature , "T4C_Records"), "CollectDate DES")
var cnt = Count(relRec)
var relatedInfo = ""
if (cnt>0) { var info = First(relRec);
relatedInfo = Text(ToLocal(info.CollectDate),"MM/DD/Y");
} else var relatedInfo="None To Date";
return relatedInfo;