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?
Solved! Go to Solution.
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.
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:
And this is the developer site for the function itself: https://developers.arcgis.com/arcade/function-reference/text_functions/#replace
@AdrianWelsh thanks for the tip!!
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 thank you!!!!