Add Space Between Combined Fields in Field Calculator

6479
31
Jump to solution
05-07-2018 07:30 AM
JRAdams
New Contributor III

In the ArcGIS Online field calculator I am trying to combine a few other fields into one (address field) and cannot figure out how to put a space between the fields. I am sure it is something simple, but I am unable to find the answer elsewhere. Please help! I've tried everything I can think of. 

Thank you!!! AGOL Admin fieldcalculator #arcgisonline

0 Kudos
31 Replies
DanPatterson_Retired
MVP Esteemed Contributor

throw an r in front of the string r" it is now raw encoded"

if it is python that it is using, it isn't python 3

0 Kudos
DougBrowning
MVP Frequent Contributor

Arcade says Invalid string when I try that.  This is an Arcade popup not python.

0 Kudos
JimmyKroon
Occasional Contributor II

Any html in the string will be interpreted, when the popup is displayed in a browser. So you can use html non-breaking space characters -      - which will be displayed as spaces in the popup. Or a little fancier, you can also use in-line css styling to left-pad the line.

Outputing this as a string should work.

<p style="padding-left:10px;">This is your error!</p>

Jimmy

0 Kudos
JimmyKroon
Occasional Contributor II

Of course, I above it was interpreted as a space!

That'd be   & n b s p ;         - remove the spaces in the middle.

0 Kudos
DougBrowning
MVP Frequent Contributor

I do understand this post.

0 Kudos
KellyGerrow
Esri Frequent Contributor

Hey Joe,

If using the calculate option in ArcGIS Online, you need to apply a specific filter in order to only calculate specific fields. Can you log an idea about calculating fields based on table selection on ArcGIS Ideas‌. I think this would be helpful to others also:

Work with fields—ArcGIS Online Help | ArcGIS 

-Kelly

0 Kudos
JoeBorgione
MVP Esteemed Contributor

Vote early and vote often!   

Kelly Gerrow

can't wait to retire....
DanPatterson_Retired
MVP Esteemed Contributor

Is field calculation in AGOL restricted to Arcade?

Then is the best suggestion is to do the 'work' of field concatenation in ArcGIS PRO or ArcMap?  (where you have options, like superior Python )

0 Kudos
JoeBorgione
MVP Esteemed Contributor

Dan- if a a feature service is hosted on AGOL, you are limited to playing by the AGOL rules. I've done python calculations (my preference; your influence) in ArcGIS Pro on feature services hosted on our own portal.... 

Dan Patterson

can't wait to retire....
0 Kudos
MikeMinami
Esri Notable Contributor

I was able to make the two suggestions above work in HTML view (highlighted yellow below) of a custom popup, outside of the arcade expression. The paragraph padding method worked better, as the non breaking spaces were converted to spaces the next time I edited the popup configuration. 

Mike

0 Kudos