Select to view content in your preferred language

Reassign display text in table using advanced formatting (remove underscores)

797
4
Jump to solution
02-15-2024 07:23 AM
dwold
by
Frequent Contributor

I would like to change the display text in a table. Currently, my values have underscores. I would like to remove those underscores so it is cleaner on the table. I am new to arcade but I believe I need to assign a variable and change the text values there and then call that variable in the displayText line?

dwold_0-1708010577602.pngdwold_1-1708010592114.png

@JenniferAcunto 

@IssyAmis 

@AdrianWelsh 

0 Kudos
1 Solution

Accepted Solutions
JenniferAcunto
Esri Regular Contributor

Yes. You are on the right track. You will want to use the Replace function to search for _ and replace it with a space. 

var prettytext = Replace($datapoint.core_capability, '_', ' ')

 

In the below example, my data has commas instead of an underscore, but the basic principle is the same. 

JenniferAcunto_0-1708097369007.png

 

- Jen

View solution in original post

4 Replies
AdrianWelsh
MVP Honored Contributor

I have used the Replace function in Arcade to replace my underscores for spaces (at least in a popup window). I think it should work for a table too. Here is an example:

https://support.esri.com/en-us/knowledge-base/how-to-replace-values-of-a-field-using-an-arcade-expre...

And this is the developer site for the function itself: https://developers.arcgis.com/arcade/function-reference/text_functions/#replace 

dwold
by
Frequent Contributor

@AdrianWelsh thanks for the tip!!

0 Kudos
JenniferAcunto
Esri Regular Contributor

Yes. You are on the right track. You will want to use the Replace function to search for _ and replace it with a space. 

var prettytext = Replace($datapoint.core_capability, '_', ' ')

 

In the below example, my data has commas instead of an underscore, but the basic principle is the same. 

JenniferAcunto_0-1708097369007.png

 

- Jen
dwold
by
Frequent Contributor

@JenniferAcunto thank you!!!!

0 Kudos