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

1713
4
Jump to solution
12-09-2021 08:37 AM
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 

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

4 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. 

keith_jackson
New Contributor II

Hi @bnmcknigh  - did you ever resolve this issue?  I am having the same problem.  I dealt with ESRI support a couple months ago, and I was able to just save in map viewer classic and let them close the ticket without an actual resolution.  But now I need to group my layers in the web map and can't use classic.  I really would love to avoid all the time working with tech support will take, so any info you can provide would be greatly appreciated.  Thanks!

keith_jackson
New Contributor II

Also to note in my case: I am symbolizing four categories, and all four show up fine in the web map.  In the Instant App, however, only three of the four show properly.

0 Kudos