Select to view content in your preferred language

Underlining and superscripting text in labels

1035
2
Jump to solution
11-22-2023 01:52 PM
Labels (2)
HaileyWright1
Regular Contributor

Following the retirement notice for Web App Builder, my department is tasked with migrating an ArcGIS Server based app, which was created in WAB, over to an Experience Builder application hosted in ArcGIS Online. Unfortunately, we don’t have access to the server in order to view the backend configuration of the map or app. Just a copy of the data (file geodatabase) and the URL of the public app. An initial snag we’ve hit has to do with replicating a custom label expression that our clients have come to rely on over the past 8 years since the application was launched. The label expression contains both underlined and superscripted text that is consistent with labelling standards for soils series data in order to match the scheme of our published soil survey reports.

The following VB label expression snippet was published from ArcMap:

"<UND>" + [SOIL_CODE1] + "</UND>" + " " + "<SUP>" + Left([EXTENT1],1)  + "</SUP>" + vbnewline + [CLASS1] 

A screen shot of the app below shows the labels displayed as expected in the existing WAB app.

HaileyWright1_0-1700689555814.png

But attempts to recreate the labels in an ArcGIS Online map have not been successful. Here’s what we’ve tried:

  • Configuring the labels with the above VB expression in ArcGIS Pro and sharing the map via ArcGIS Pro causes the labels to disappear entirely in ArcGIS Online’s map viewer and map viewer classic.
  • Configuring the labels with the following Arcade expression in ArcGIS Pro and sharing the map via ArcGIS Pro looses the underline and superscript formatting in map viewer and map viewer classic. "<UND>" + $feature["SOIL_CODE1"] + "</UND>" + " " + "<SUP>" + Left($feature["EXTENT1"],1)  + "</SUP>" + TextFormatting.NewLine + $feature["CLASS1"]     

Here’s the VB (red) and Arcade (black) expressions working as expected in ArcGIS Pro:

HaileyWright1_1-1700689555819.png

But not in ArcGIS Online:

HaileyWright1_2-1700689555825.png

Can someone help us understand what we’re missing? Either a) how to replicate the existing labels seen in our WAB app in our new ExB app or b) how/why this was possible to do with our VB/ArcMap/ArcGIS Server/WAB work in 2016, but not today with the current technology Arcade/ArcGIS Pro/ArcGIS Online/ExB?

 

1 Solution

Accepted Solutions
gis_KIWI4
Frequent Contributor

I don't believe this possible in AGOL. Arcade has HTML formatting tags in Pop-up profile but not for Labels. 
I haven't tried this but you could possibly change your labels to annotations and have them show up with the right formatting. Although this will open up another set of problems as they will not be dynamic as you zoom and pan around.

A few other have been struggling with this without any outcomes - 

https://community.esri.com/t5/arcgis-online-questions/how-do-i-change-the-text-color-of-my-label-in-...
https://community.esri.com/t5/arcgis-online-questions/confused-about-arcade-labeling-compatibility/m...

Could check to see if there is something logged as an Idea in AGOL section 🙂 

 

View solution in original post

2 Replies
gis_KIWI4
Frequent Contributor

I don't believe this possible in AGOL. Arcade has HTML formatting tags in Pop-up profile but not for Labels. 
I haven't tried this but you could possibly change your labels to annotations and have them show up with the right formatting. Although this will open up another set of problems as they will not be dynamic as you zoom and pan around.

A few other have been struggling with this without any outcomes - 

https://community.esri.com/t5/arcgis-online-questions/how-do-i-change-the-text-color-of-my-label-in-...
https://community.esri.com/t5/arcgis-online-questions/confused-about-arcade-labeling-compatibility/m...

Could check to see if there is something logged as an Idea in AGOL section 🙂 

 

HaileyWright1
Regular Contributor

Thanks @gis_KIWI4. I understand now that ArcGIS Server's Map Services offers more advanced labelling options than ArcGIS Online. It's not possible to do this in AGOL with arcade.

0 Kudos