So I need to symbolize based on two attributes: the INSP_STATUS and the Subtype. If there is no INSP_STATUS (ie. = null), than each subtype will have a different symbol.
But....if there is an INSP_STATUS (ie. a few different options), than regardless of the Subtype, they can all be the same symbol. This is what I have so far....a symbol for each subtype:
When I try to add a custom value with some conditional statement for the "YES" INSP_STATUS to cover all of the sybytpes, I just get an error:
Does anyone know how to accomplish this?? Or do I just need to make a symbol for every possible combination of INSP_STATUS and Subtype??
Solved! Go to Solution.
You can use an Arcade expression as unique value field (click the expression button on the right of the field). Something like this should do what you want:
// for features without INSP_STATUS, return the subtype
if(IsEmpty($feature.INSP_STATUS)) {
var subtypes = ["MaintenanceHole", "InspectionMH", "BackFlow", "DiversionMH", "FlapGateMH"]
var i = $feature.SubtypeCD - 1
return subtypes[i]
}
// for features with INSP_STATUS, return a default value
return "YES"
Can you change your primary symbology to Manual Breaks and categorize the symbology that way? Just click the more option and select show values out of range for the null option
Manual Breaks?? I'm not sure what you are talking about. I'm using Unique Values with two attributes....Subtype Code and INSP_STATUS. I'm not symbolizing numerical data.
Maybe you can't use Manual Breaks then. Try different Primary symbology and see if you can accomplish your goal that way.
Could you use the "show all other values" option?
Since you already specify symbols for all subtypes when there is not an insp_status, and want everything else to be the same symbol, then that should be "all other values" if I understand correctly.
All other values would work if I only had one type of INSP_STATUS, but I have 4 different values that INSP_STATUS could possible be.
So 5 types of subtypes and 4 types of INSP_STATUS. That's a total of 20 different combinations of symbols if I did it all manually, but there has got to be a better way of doing this.
try creating a style for your attributes, then base your symbology off that style
Use Unique Values, set Field 1 as INSP_STATUS, and then create an expression to concatenate INSP_STATUS and Subtype. That will give you symbols for all possible combinations. For the combinations that have an INSP_STATUS, select them in the symbols list then right click any one of them and select Group values.
You can use an Arcade expression as unique value field (click the expression button on the right of the field). Something like this should do what you want:
// for features without INSP_STATUS, return the subtype
if(IsEmpty($feature.INSP_STATUS)) {
var subtypes = ["MaintenanceHole", "InspectionMH", "BackFlow", "DiversionMH", "FlapGateMH"]
var i = $feature.SubtypeCD - 1
return subtypes[i]
}
// for features with INSP_STATUS, return a default value
return "YES"
Thanks Johannes. Arcade to the rescue again! I will check this out and see if I can get it to work.