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'");
AND is used when you want another field to have another value like "Type = 'RED' AND Lot = 'STUDENT'"
If you have many types, you can also use the syntax
featureLayer.setDefinitionExpression("TYPE in ('BLUE', 'RED')");
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.