Hi Field Mappers,
Got an easy win for you.. I think? I am still fairly new to working with FeatureSets in arcade.
I have a parent/child relationship point and record. I want to show the last date checked from the record in the parent pop-up. When I go to add it in as an attribute expression and "Run" it it works, however when I go into map viewer and in Field Maps I can't get it to work.
I've followed a few basic tutorials online, but am not sure what's wrong here.
I have double and triple checked I have the correct FeatureSetByRelationshipName relationship name and checked field names for upper and lower cases.
My parent and child are both points.
var relatedrecords = OrderBy(FeatureSetByRelationshipName($feature,"BaitStation_Checks"), "DateChecked DES");
var cnt = Count(relatedrecords);
var relatedinfo = "";
if (cnt > 0) {
var info = First(relatedrecords);
relatedinfo = Text((info.DateChecked), "ddd DD/MM/YYYY");
}
DefaultValue(relatedinfo,"No checks to date") Any help you can offer would be greatly appreciated.
In addition I would like to grab info from two more fields in the most recent check. Same feature we're calling from above. If anyone has a tip for that I'd love to know. Thanks in advance for your time and helping me broaden my arcade knowledge.