Select to view content in your preferred language

How to create a Filter expression with AND and OR

156
3
Jump to solution
3 weeks ago
Labels (1)
SanchezNuñez
Frequent Contributor

Good morning,

Is there a way to add in a web map a filter to a layer that has a condition with AND and OR

For example   ProjectStatus = Active and (ProjectLocation = "Park" or "Residential" or "Commercial")

Thanks

0 Kudos
1 Solution

Accepted Solutions
JenniferAcunto
Esri Regular Contributor

You can create a condition group by clicking on the three dots and select add condition.

JenniferAcunto_1-1754589297918.png

 

 

From there you can select if any are true (or) or if all are true (and) for that specific group. 

JenniferAcunto_0-1754589268096.png

 

- Jen

View solution in original post

3 Replies
RPGIS
by MVP Regular Contributor
MVP Regular Contributor

Hi @SanchezNuñez,

You cannot include a grouping of clauses in a map filter. However, you can set it up so that it looks like the example below.

ProjectStatus = Active

AND

ProjectLocation

Includes( *Selected Values)

RPGIS_0-1754581763810.png

 

JenniferAcunto
Esri Regular Contributor

You can create a condition group by clicking on the three dots and select add condition.

JenniferAcunto_1-1754589297918.png

 

 

From there you can select if any are true (or) or if all are true (and) for that specific group. 

JenniferAcunto_0-1754589268096.png

 

- Jen
JoseSanchez
Frequent Contributor

Thank you @JenniferAcunto 

This is what I did and it worked.

0 Kudos