0

I have a simple query like

query.where = "NAME = 'Renfrew'";

which works perfectly on QueryTask(). Now I would like to select array of points like

query.where = "NAME = 'Central Branch' AND NAME = 'Renfrew'";

but it is not working. Can you please let me know how to fix this?

2

I suspect you are looking to use OR instead of AND in your query since no feature would have both of those names.

AND could be used with another attribute to further narrow your results.

| improve this answer | |
1

Another option is to use in, for example:

query.where = "NAME in ('Refrew', 'Central Branch')";

This is easier to manage (compared to a long series of OR statements) once you get a significant number of Names to manage.

| improve this answer | |

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.