There are two fields in the layer that I want my symbology to be based on.
Is there any way to create query for symbology?
I need something like: "if filed 2 < > Null, while field 1 = John - blue
"if field 2 = Null, while field 1 = John - red
if field 2 = Null, while field 1 = Bob = orange
Creating duplicate layers with definition queries is not a solution for my case,
Thanks!
Is this only for ArcMap and not mobile applications? If so, you can base your symbology on two fields, the problem occurs if you want that symbology displayed in one of ESRI's mobile apps which do not support symbology based on two fields.
Tiffany, thank you for your reply. I can not do it using this method. One of the fields is "date completed" and another one is "inspector". date completed has many many values, i do not want to specify color for each of them. Also because they will be constantly added. I just need 1 color for the case when date completed is empty but inspector field is not empty, second color when inspector is not empty and date completed is not empty either,
A very simple way, without having to code anything, would be to:
**first, make sure your layer is backed-up for the sake of posterity**
1) start an edit session on your layer
2) add a new text field to your layer - call it something like "symbol"
3) select-by-attributes and run your first of the three queries:
field2 is not null and field1 = 'John'
4) right click "symbol" and calculate your field "blue"
5) select-by-attributes and run your second of three queries:
field2 is null and field1 = 'John'
6) right click "symbol" and calculate your field "red"
7) select-by-attributes and run your third of three queries:
field2 is null and field1 = 'Bob'
😎 right click "symbol" and calculate your field "orange"
9) verify your edits and save
10) stop editing
11) right click your layer in the TOC and choose "properties"
12) symbology tab
13) categories section
14) unique values
15) choose "symbol" as your value field
16) click "Add All Values"
17) double-click the "blue" box, select "blue" fill
18) double-click the "orange" box, select "orange" fill
19) double-click the "red" box, select "red" fill
There are other ways to handle this, but I gave you one which should be straightforward to apply.