Select to view content in your preferred language

How do I combine two list fields for unique symbols?

531
0
06-30-2020 09:15 AM
JasonBennett
Occasional Contributor

I have two fields that are numbered lists. I want to create conditions that change the unique symbol based on a combination of these fields. Basically, if a condition in Field A is true, use Field B to set the unique symbol, otherwise use Field A.

This is what I've come up with in for a custom expression:

var underground = 0
var aerial = 1
var existing = 2

var type = $feature.Route
var status = $feature["Segment_Status"]

if (type == underground){
    return DomainName($feature,"Segment_Status")
}
else{
    return DomainName($feature,"Route")
}

This almost seems to work. It combines most of the items in both lists so that I can customize the symbols (however, Underground is missing):

When I attempt to edit one of these fields from the Pop-up on the map, all of the symbols disappear and the map looks empty except for the labels that remain.

To add detail to the question; How do I combine two lists to create unique symbols that list all of the symbols and does not make all of the symbols disappear when one of the fields is updated?

I may be going about this all wrong. Any help would be appreciated!

0 Kudos
0 Replies