I have some parcel data that has more than 1 space between the Township/Range section and the Lot eg:
1N1E36D -00100
However in both ArcGIS Pro and ArcGIS Online the popup strips the internal spaces to just one space.
1N1E36D -00100
I have tried arcade expressions to get the popup to render the internal spaces correctly to reflect how they are in the database:
Replace($feature.PARCEL_APN," ","nbsp")
but it shows this instead:
1N1E36Dnbspnbsp-00100
* note I used the correct syntax, i just used the incorrect syntax here so it wouldn't render as spaces
The popup always strips them after the expression calculation so it doesn't matter what I do in the expression builder for configuring the popup. This also happens in ArcGIS Online as well.
Am I just missing the sytnax or is this one of those it's a feature not a bug kind of things?
Solved! Go to Solution.
Hi Anthony Blackham ,
I agree that this should be considered a bug, although it might be behaviour as designed. If a user needs to have multiple sequential spaces in a string, these shouldn´t be automatically stripped out.
There is however an alternative that seems to work when you replace the space by Alt+255. This works in the pop-up, not in the label expression. See example below where I used more spaces to make it more visual:
Wee below the expression I used:
Expression (please note that the second pair of quotes contains the Alt+255 instead of a space):
var par = "1N1E36D -00100";
var alt = Replace(par, " ", " ");
return alt;
Hi Anthony Blackham ,
I agree that this should be considered a bug, although it might be behaviour as designed. If a user needs to have multiple sequential spaces in a string, these shouldn´t be automatically stripped out.
There is however an alternative that seems to work when you replace the space by Alt+255. This works in the pop-up, not in the label expression. See example below where I used more spaces to make it more visual:
Wee below the expression I used:
Expression (please note that the second pair of quotes contains the Alt+255 instead of a space):
var par = "1N1E36D -00100";
var alt = Replace(par, " ", " ");
return alt;
Thanks for the tip, I'll try it out on the web map, it still doesn't seem to be working on ArcGIS Pro for the expression in configuring the popup (when clicking on a parcel using the explore button)
You shouldn't include (write) "Alt+255" in the expression. You should hold the Alt key and type 255, this will produce the alternative space sign.
my mistake, I'm used to unicode characters. I can confirm this worked as anticipated, thanks for the help!
Glad to hear that it worked.
Just an update for anyone else who comes across this - it looks like the issue was fixed in ArcGis Pro 2.5. I don't know if it will also be fixed on ArcGIS online, I'll have to check once our enterprise environment is updated with the new beta.
as another update, behaviour reverted in ArcGIS Pro 2.6 so the workaround above is again needed if you wish to retain internal spaces when copy/pasting contents of the HTML popups.
This also works in ArcGIS Pro to add trailing whitespace in strings in reports where postStr=" " fails.