Labels On Web Map Shows Domain Codes instead of Domain Value

3351
6
Jump to solution
03-30-2021 08:39 AM
sayamshivakumar
Emerging Contributor

Hi,

I have a requirement to show the labels in ArcGIS Collector app and Portal Web Maps.

I have a published a Feature Service by Configuring the below label expression which is working fine in ArcGIS Pro Desktop. but after publishing to ArcGIS Server, The web map is showing the Domain Codes instead of Domain Description in Portal web maps and in ArcGIS Collector App. 

code I'm using for label:   DomainName($feature, 'Diameter') + "-" + DomainName($feature, 'Material').

Any Quick help is much appreciated,

Thank You in Advance. 

0 Kudos
1 Solution

Accepted Solutions
ScottBaum1
Emerging Contributor

Whatever happened with this?  I am experiencing the same problem.

View solution in original post

6 Replies
Jelle_Stu_PR
Frequent Contributor

What version of ArcGIS Server are you using? The DomainName() function was introduced with arcade 1.7. Version 1.7 can be used for ArcGIS Enterprise 10.7.1 (2019) and up. See version matrix here. 

0 Kudos
sayamshivakumar
Emerging Contributor

we are using, 10.8.1 ArcGIS server

0 Kudos
ScottBaum1
Emerging Contributor

Whatever happened with this?  I am experiencing the same problem.

sayamshivakumar
Emerging Contributor

If you're using any subtypes.
Assign the default domain.

We have assigned the default domain, this has resolved the issue. 

ScottBaum1
Emerging Contributor

That was the clue I needed.  It took some time to figure out, but I changed my code from DomainName($feature, 'diameter') to DomainName($feature, 'diameter', $feature.diameter, $feature.assetgroup) and that worked.

sayamshivakumar
Emerging Contributor

Kudos @ScottBaum1 👍

0 Kudos