Select to view content in your preferred language

Add a where clause on all the FeatureSet calls

06-28-2022 01:03 PM
Status: Open
Labels (1)
MVP Esteemed Contributor

I posted this once deep down in a discussion but I cannot find it.  It is starting to cause issues.

I would like the FeatureSet functions to have a where clause (like search cursor, REST, and other functions).

The big issue I am having is speed and timeouts.

Without a where clause all features are always returned then I have to filter them like this.

var sql = "PointID = '" + $feature.PointID + "'";
var tbl = FeatureSetByName($map,"Points", ['SpeciesState'], false);

var filteredtbl = Filter(tbl, sql);
return First(filteredtbl).SpeciesState

In my case there will always be just 1 item that matches my Filter query.  But I still have to wait on FeatureSet to go grab all the records - as my HFS approaches 100,000 records it gets slow.  I am also hitting record limit issues I think.  If my HFS as a record return limit of say 1,000 does this affect FeatureSet?  It seems to at least in a Ops Dashboard I made.  FeatureSet calls layer, it is way over the 1,000 limit, then my filter gives me back blank.

I think adding a where clause would dramatically speed up FeatureSet and maybe even allow it to be fast enough to use in symbology.


var sql = "PointID = '" + $feature.PointID + "'";

var tbl = FeatureSetByName($map,"Points", ['SpeciesState'], false, sql);

thanks for considering.  Should be an easy add I think.