Select to view content in your preferred language

How to query server-side FeatureTable?

394
11
Jump to solution
08-14-2024 02:11 PM
ForrestLin
Frequent Contributor

Is it possible to query server-side FeatureTable without re-creating FeatureLayer?

 

 

Tags (1)
11 Replies
MatthewDriscoll
MVP Alum

The question was how to do it without definitionExpression.  So marking your solution as the correct one, by using definitionExpression, is a bit miss leading for those searching for the same thing in the future.

0 Kudos
ForrestLin
Frequent Contributor

After FeatureTable with FeatureLayer is created,

call 

queryFeatureLayer(query: string) {
    featureLayer.definitionExpression = query;
    featureLayer.refresh();
}
 
for each query/search.
 
Don't need to re-create FeatureLayer for each query/search.
 
0 Kudos