Hi, I am having an issue with an Arcade expression in a pop while using field maps, specifically in offline mode. I have a feature class (monitoring well) and a linked standalone table (gauging_data). For the popup, I have an arcade expression pulling the most recent data and then I pass that to a survey123 link for further data collection. This all works great online (as shown) but when I pull the map offline I get the following error:
Expression Name: expr1
Expression Title: Date
Error Domain: com.esri.arcgis.runtime.error
Error Code: 15
Error Description: Invalid call., Unable to evaluate arcade expression. Evaluation_error_code::field_not_found Line :19
My arcade expression is as follows:
var relatedrecords = FeatureSetByRelationshipName($feature,"Gauging_Data", ['Well_ID','Depth_to_Water_ft_BTOC', 'Total_Well_Depth_ft_BTOC'], false);
var cnt = Count(relatedrecords);
var relatedinfo = "Date_and_Time";
if (cnt > 0) {
var sortedrecords = OrderBy(relatedrecords, "Date_and_Time DES");
var latestinfo = First(sortedrecords);
relatedinfo = Text(ToLocal(latestinfo["Date_and_Time"]), "M/D/Y");
} else {
relatedinfo = "None available";
}
return relatedinfoI am thinking it might have something to do with GUID/Global ID case sensitivities (https://community.esri.com/t5/arcgis-field-maps-questions/featureset-not-working-offline-in-field-maps/td-p/1162899), but since I am using FeatureSetbyRelationshipName, I am not sure how to fix. In my case 'Well ID' is my GUID field I am using to link to the feature class. Thanks.