Select to view content in your preferred language

javascript: layer.definitionExpression not update the service publish in ArcPro

90
1
2 weeks ago
baohuachu7
Emerging Contributor

Pulished one layer with "Query Builder",for example: diameter<500, and in the javascript api to update it using "layer.definitionExpression": diameter:diameter<100. Its result is not as I want.

It seems in Query Builder filtered the data in service.  The definitionExpression only filter on the base of service.

0 Kudos
1 Reply
Noah-Sager
Esri Regular Contributor

Hi @baohuachu7, thanks for posting your question here. I'm not sure about "Query Builder" with ArcGIS Pro, but for the JavaScript Maps SDK, we have some good examples of querying and definitionExpression that could prove to be helpful guides for you.

https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-query-basic/

https://developers.arcgis.com/javascript/latest/sample-code/layers-mapimagelayer-definitionexpressio...

https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-queryextent/

 

0 Kudos