Set symbology based on attributes from multiple fields?

4954
1
Jump to solution
07-31-2018 02:12 PM
deleted-user-jxpbpbjlZInj
Occasional Contributor

I have a layer with two fields: "SafetyIssue" and "Status"

Safety issue can be either "yes" or "no". Status can be either "pending" or "completed".

I want to derive the symbology based on attributes from these two fields. If a Status is "Pending", then I want it to be displayed by SafetyIssue ("yes" or "no"). If Status is "Completed" then I want it to show a symbol that reflects that.

I'm pretty sure I have to write an expression to do this, but then I'm at a loss as for what I actually DO with the expression! 

So - what expression do I write, and then what in the world do I do with it? Or are all my assumptions wrong?! Help, please!

1 Solution

Accepted Solutions
ChrisWhitmore
Esri Regular Contributor

Hi Sunny,

There are probably better ways to tackle this but a simple way would be to use Arcade to generate a multi-variate unique types renderer and then adjust the resulting types in the ui. Using the fields you posted above (as well as the two possible values you listed for each field), the expression would look like this:

$feature.Status + ', ' + $feature.SafetyIssue

This will create unique types for all the possible combinations of the two fields in your data (which should be "pending, no", "pending, yes", "completed, no", "completed, yes"). It should give you something like this:

From there, you can then adjust labels, symbology. Here's my attempt (note you can symbolize "completed, no" and "completed,yes" to appear as if they are the same type (or you can group them under 'Other' and relabel / style as needed).

View solution in original post

1 Reply
ChrisWhitmore
Esri Regular Contributor

Hi Sunny,

There are probably better ways to tackle this but a simple way would be to use Arcade to generate a multi-variate unique types renderer and then adjust the resulting types in the ui. Using the fields you posted above (as well as the two possible values you listed for each field), the expression would look like this:

$feature.Status + ', ' + $feature.SafetyIssue

This will create unique types for all the possible combinations of the two fields in your data (which should be "pending, no", "pending, yes", "completed, no", "completed, yes"). It should give you something like this:

From there, you can then adjust labels, symbology. Here's my attempt (note you can symbolize "completed, no" and "completed,yes" to appear as if they are the same type (or you can group them under 'Other' and relabel / style as needed).

View solution in original post