I'm using the below code, attempting to filter a related table for inspections to show a message in the pop-up
var gid = $feature.globalid
console(gid)
var signcount = filter(FeatureSetByName($map,'Sign_Information', ['*']),'parentglobalid = gid')
console(signcount)
var x = typeof(signcount)
console(x)
var sign = count(signcount)
console("sign = "+sign)
var p = ""
when(sign > 1, p = "There are "+sign+" sign surveys on this asset",
sign == 1, p = "There is 1 sign survey on this asset",
p = "There are no sign surveys recorded for this asset")
return p
This just fails and errors in the expression builder.
Further interrogation in Pro gives
I have consoled out the type of the signcount to rule out issues there.
What's the inevitably very obvious thing I'm missing?
Thanks