Arcade symbology expression works in Map Viewer Classic but not in New Map Viewer

429
2
Jump to solution
12-09-2021 08:37 AM
Labels (2)
bnmcknigh
New Contributor

A bit of background, I have a hosted feature layer that's recording the status of solid waste pickups by quarter section for 4 different collection areas. So in other words, the quarter sections have a field denoting the collection area (Area 1-4) as well as the collection status (Collected, Not Collected; domain values of Collected, NotCollected). 

I want to symbolize this layer by the collection area (area 1-4) as well as if the status is collected. Quarter sections that have a status of not collected would be symbolized the same no matter the collection area.

For the Arcade expression, I decided to use the When logical function (I also tried IIf). Here is my expression below, just for 2 areas: 

When($feature.Area == 'Area 1' && DomainName($feature,"collection_status") == 'Collected', "Area 1 Collected", $feature.Area == 'Area 2' && DomainName($feature,"collection_status") == 'Collected', "Area 2 Collected", 'NotCollected')

The expression results in the below symbology when using the Map Viewer Classic, which is what I'm expecting. 

bnmcknigh_3-1639065746886.png

However, when using the same expression in the New Map Viewer, I get this. 

bnmcknigh_4-1639065957320.png

Looking at the style options, there's no values categorized in other. In addition, the count for Not Collected is off, I would expect to see a value of 232. There's 505 quarter sections in total so I'm not sure what happened to the other 7?

bnmcknigh_5-1639066022605.png

Lastly, to add the Arcade expression does also work in ArcGIS Pro 2.9: 

bnmcknigh_6-1639067573370.png

So am I missing something? Is there a limitation with the New Map Viewer? 

Thanks in advance for the help! 

@XanderBakker 

0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor

Hi @bnmcknigh ,

I don't think you are missing anything. I just noticed that when your symbology is based on an Arcade expression, it looks like it does not scan for the possible values that can result and just returns a single value. Since you cannot add values in the Map Viewer, you would need to edit the json in https://ago-assistant.esri.com/ and add the missing categories, which is not something I recommend.

It is better to log this with support.

 

View solution in original post

2 Replies
XanderBakker
Esri Esteemed Contributor

Hi @bnmcknigh ,

I don't think you are missing anything. I just noticed that when your symbology is based on an Arcade expression, it looks like it does not scan for the possible values that can result and just returns a single value. Since you cannot add values in the Map Viewer, you would need to edit the json in https://ago-assistant.esri.com/ and add the missing categories, which is not something I recommend.

It is better to log this with support.

 

bnmcknigh
New Contributor

Hi @XanderBakker

Thanks for taking a look. I'll go ahead and submit a tech support case.