Arcade with Related Records Problem in Enterprise Webmap

03-09-2020 11:03 AM
Occasional Contributor

I am having an issue with Arcade fetching related records when using a FeatureServer layer in the WebMap. The code:

var tbl = FeatureSetByName($datastore,"Raptor_Protection_Repeat");

var code = $feature.GUID;

var sql = "GUID = '" + code + "'";

var related_data = Filter(tbl, sql);

var cnt = Count(related_data);
var result = cnt + " related records";

if (cnt > 0) {
// loop through related records
for (var row in related_data) {
// read some data and create the line you want
var line = TextFormatting.NewLine + " - " + row.PROTECTION;
// add the line to the result
result += line;
} else {
result = "No related records:";

// return the result
return result;

This works as expected if the layer in the Map is 

But for this application, I need 

When I try the above code as an arcade expression on the FeatureServer layer, I get the following error: 

Execution Error:Feature Not Found

The console produces the count and sql as expected. It seems to fail on loop, specifically "var row in related_data".

In Dev tools (chrome) I see the following error: /portal/jsapi/jsapi4/:346 [] convertToFeatureSet:unknown-geometry [object Object]


Any insight here would be greatly appreciated!


Jim Faron

Tags (1)
0 Kudos
0 Replies