Symbology by Expression

3290
2
Jump to solution
01-19-2012 06:13 AM
DavidPaul
New Contributor
I need to symbolize a layer based on the presents or absents of data.

The layer has a text field that has some of the rows populated and some not.

The fill of the symbol that is related to that column in the table needs to be:
RED if the row IS NOT null
WHITE if the row IS null

Is there a way to do this without creating a calculated field?

Dave
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RichardFairhurst
MVP Honored Contributor
I need to symbolize a layer based on the presents or absents of data.

The layer has a text field that has some of the rows populated and some not.

The fill of the symbol that is related to that column in the table needs to be:
RED if the row IS NOT null
WHITE if the row IS null

Is there a way to do this without creating a calculated field?

Dave


You use a Categorized symbol layer.  Just add the Null value category only and assign it a color of WHITE (optionally group it with whitespace values such as "" or " " if you like).  Then enable the "All Other Values" symbol and make its symbol RED.  Now the layer will color any and all values that are not null as Red regardless of how ever many values your layer may have as well as any future values that may currently be unknown.  If you click the "Count" column heading at the right hand side of the symbol area, you can get a count of how many features fall in each of the two groups.  The layer will respond instantly to any changes in the field, unlike a calculated value based on the field.

View solution in original post

0 Kudos
2 Replies
RichardFairhurst
MVP Honored Contributor
I need to symbolize a layer based on the presents or absents of data.

The layer has a text field that has some of the rows populated and some not.

The fill of the symbol that is related to that column in the table needs to be:
RED if the row IS NOT null
WHITE if the row IS null

Is there a way to do this without creating a calculated field?

Dave


You use a Categorized symbol layer.  Just add the Null value category only and assign it a color of WHITE (optionally group it with whitespace values such as "" or " " if you like).  Then enable the "All Other Values" symbol and make its symbol RED.  Now the layer will color any and all values that are not null as Red regardless of how ever many values your layer may have as well as any future values that may currently be unknown.  If you click the "Count" column heading at the right hand side of the symbol area, you can get a count of how many features fall in each of the two groups.  The layer will respond instantly to any changes in the field, unlike a calculated value based on the field.
0 Kudos
RichardFairhurst
MVP Honored Contributor
If this answered your question, please click on the Answered checkmark that is under the rating numbers on my post to change the thread icon to an Answered thread for the benefit of others.
0 Kudos