I am using ESRI JavaScript API 3.6. I want to perform a query operation on the fields returned by the rest service. As far as I know and have read, we can use like and = operators to query single values. But how do I pass more than one value to query?

In my app, I have a world map that highlights about 4-5 countries on load. Is there a way where I can say query.where="COUNTRY in 'india,us,uk'?


I have used the IN operator in my JS apps to provide a where clause to the Export Item REST endpoint. I would imagine if IN works there it would also work for the Query Item endpoint, which is called by the Query object in JS.

I used IN to query specific OBJECTID's in my dataset to be exported (you can't give a list of ID's to the Export Item endpoint like you can with a Query). I simply made my where clause = OBJECTID IN (1234,3333,5555,...);.

  • Super it works fine
    – Anil
    Sep 10 '13 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.