AnsweredAssumed Answered

FeatureSetById not working as expected

Question asked by leo@eniig.dk on Aug 11, 2020
Latest reply on Aug 12, 2020 by leo@eniig.dk

Hi

I got a FeatureServer with 1 layer and 1 table.

 

Im trying to create a popup on a webmap, the popup should display some data from the table, but the result is not as i expected. To figure out the issue, im using the following code

 

var all =FeatureSetById($map, "TrafoContainer_5842")
console("countAll: "+count(all))
console("TypeAll: "+TypeOf(all))

var tt = top(all,10)
console("TypeTT: "+TypeOf(tt))
console("countTT: "+count(tt))
var fst = First(all)
console("TypeFirst: "+TypeOf(fst))

return

 

In the console the following is printed

 

countAll: 15633 <---- This matches the number of features in the table 
TypeAll: FeatureSet <---- Looking good
TypeTT: FeatureSet <---- Still happy
countTT: 0 <-----Oh no I would have expected 10
TypeFirst: <------

Any ideas on what is wrong?

Outcomes