I have a hosted feature layer with multiple records per day for a feature. How would I return only the most recent record per day?
Here is my code, but returns multiple records per day:
var mowhistory = Overlaps(FeatureSetByPortalItem(Portal('https://www.arcgis.com'),"00871a3866be4ceaa11f7841b43cf82a",0), $feature); var mowhistorytimeSorted = Orderby(mowhistory, 'lastserviced DSC')
var popupString = "";
for (var myfeature in mowhistorytimeSorted){
popupString += text(myfeature.lastserviced, 'MMM DD Y, hh:mm A') +
TextFormatting.NewLine
}
return popupString