Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

scripting line break in comments field

Krischan
Giga Guru

I have an import, I want to add some scripts to and I start asking, how I can put various fields into the comment field.
So the idea is:
putting.



into one target field with a script 🙂 because the source data have 3 different comment fields (I hate it) and I need to get all of them into service now.

regards

Chrisian

1 ACCEPTED SOLUTION

CherylFlood
Giga Contributor

To add a line break:
answer = source.commentField1.toString() + "\n" + source.commentField2.toString() + "\n" + etc.


View solution in original post

6 REPLIES 6

Krischan
Giga Guru

Thanks... that worked great.


Edxavier Robert
Mega Sage

Hi, 

Other option would be using this: %0D%0A instead of \n\n