I have an arcade expression that pulls data from a relationship into the associated feature class's popup. It loops through multiple associated records and outputs all found ones for that feature class. In Pro, it outputs correctly to the popup.
However, in Portal,I get an error: Execution Error:Filter cannot accept this parameter type.
I'm not quite sure how to fix this. Any advice?
// access multiple fields in related table
var tbl = FeatureSetByRelationshipName($feature,"UNDATA.PipelineLine_ServiceHistory");
//connecting feature
var mxloc = $feature["MXLOCATION"];
//sql expression for related tbl
var tbl_sql = "MXLOCATION = @mxloc"
var histories = Filter(tbl, tbl_sql)
var cnt = Count(histories)
//Console(cnt)
var result = "";
//Loop through each record
if (cnt > 0) {
result = cnt + " Record(s):" + TextFormatting.NewLine;
// for each record, get information and append to result output
for (var history in histories) {
var txt_mxloc = Text("Asset Number: " + history.ASSETNUM) + TextFormatting.NewLine;
var txt_date = txt_mxloc + "- Install Date: " + Left(Text(history.INSTALLDATE), 9) + TextFormatting.NewLine;
//var txt_dsc = txt_date + "- Description: " + Text(history.DESCRIPTION);
var txt_dsc = txt_date + "-Description: " + Text(Round(history.PIPELEN)) + " ft " + Text(history.DIAMTR_C) + '" ' + Text(history.PIPEMATL) + TextFormatting.NewLine;
var txt_coat = txt_dsc + "-Coating: " + Text(history.COATTYPE);
result += TextFormatting.NewLine + txt_coat;
}
}
else {
result = "No Records";
}
Console(result)
return result