For example, if I have the code:
featureLayer.setDefinitionExpression("TYPE='BLUE'");
Can I set multiple expressions such as TYPE='RED' and TYPE='BLUE'?
If so, what is the proper syntax to do so?
Thanks!
Eric,
Sure it would be:
featureLayer.setDefinitionExpression("TYPE='BLUE' OR TYPE='RED'");
If you have many types, you can also use the syntax
featureLayer.setDefinitionExpression("TYPE in ('BLUE', 'RED')");
AND is used when you want another field to have another value like "Type = 'RED' AND Lot = 'STUDENT'"
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.