New Line Characters in Field Calculator Processor

1226
2
08-23-2017 06:07 AM
JustinGreco
Occasional Contributor

I am attempting to have a new line be created using a field calculator by just using \n in the expression.  However doing this results in \\n being stored after the calculation.  Any suggestions on how to get around this, is there a proper way to escape backslashes?

expression used in field calculator processor

resulting JSON in feature layer

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus
"\n".join(["hello", "testing"])
'hello\ntesting'

but that would mean that you are providing a list or tuple of things to your object

0 Kudos
JustinGreco
Occasional Contributor

I actually just answered it myself by using <br> instead of \n.  Thanks for the other answer.