Select to view content in your preferred language

Dynamically applying query def on a layer for the webmap

1211
4
Jump to solution
06-22-2018 12:18 PM
VenkataSrikanth_Dasari
Regular Contributor

Hi,

I need to apply a long query on the layer of a web map in javascript.. Need help on this..

If i apply filter with more than 300 conditions then layer is not working at all for query or anything else..

searchLayer._defnExpr='' //More than 4000 conditions..

Cheers,

Srikanth Dasari

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Is it 300 conditions for one field? If so are you using the "IN" operator?

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Is it 300 conditions for one field? If so are you using the "IN" operator?

0 Kudos
VenkataSrikanth_Dasari
Regular Contributor

Thank you for the immediate response.. what is the limit if we use IN operator??

0 Kudos
BlakeTerhune
MVP Regular Contributor

The limit for Oracle is 1000. I think SQL Server is in the tens of thousands (less than 60,000). I did see an interesting workaround by just splitting it up into two IN clauses:

Where Col IN (123,1234,222,....)
or Col IN (456,878,888,....)‍‍‍‍

If you have thousands of values, you might consider just making a table for comparison.

Where Col IN (Select val_col from values_table)
VenkataSrikanth_Dasari
Regular Contributor

Thanks for the suggestions. However, feature layer is too slow to render on the map.. and it is requesting multiple requests to the server with different extents which affects the performance..

Any other suggestions ?

0 Kudos