I'm testing how to show an arcade expression in a popup that filter and relates data. Following an example in a blog I want to show data from a point hosted layer in a polygon hosted layer popup. My code is...
var portal = Portal("https://<<myportal>>/portal")
var permisos = FeatureSetByPortalItem(portal,"59e9fa29fcb149148dd95b6ea7fb3364", 0,['Caso','catastro'],true);
var Parcela = $feature["NUM_CATASTRO"]
var filterStatement = 'catastro = @Parcela'
var relatedData = Filter(permisos,filterStatement)
var relatedDataSorted = OrderBy(relatedData,'caso asc')
var popupString = ''
popupString +=
"Parcela: " +
DefaultValue($feature["NUM_CATASTRO"], 'no data') + TextFormatting.NewLine +
"OLDPID: " + DefaultValue($feature["OLDPID"], 'no data') + TextFormatting.NewLine +
TextFormatting.NewLine
for (var f in relatedDataSorted){
popupString +=
"PermisoID: " +
DefaultValue(f.Caso, 'no data') + TextFormatting.NewLine
}
DefaultValue(popupString, 'No measurements to show')
return popupString
I can successfully test the expression in the dialog window.
But the popup just don't show the results expected.
Any help is appreciated.
Thanks
Ulises Feliciano Troche