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'"
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.