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?

asked Sep 15, 2016 at 21:31

2 Answers 2

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.

answered Sep 15, 2016 at 22:33
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.

answered Sep 15, 2016 at 23:29

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.