Flow Designer: How to enter new line in Description field in Create Task?

kevin_eldridge
Kilo Guru

I am trying to enter a new line character in a block of text I want to enter using Flow Designer for the Description field. No matter which codes I use on the Create Task, such as the following examples are not working:

Create Task -> Set Description to -> <varbiable> + '\n' + <variable>

Create Task -> Set Description to -> <varbiable> + '<br>' + <variable>

Create Task -> Set Description to -> <varbiable> + <br> + <variable>

Nothing is working. Can anyone assist with this issue?

Thank you,

Kevin Eldridge

4 REPLIES 4

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Kevin,

 

Try as

javascript: "<varbiable> \n <varbiable>"

Screenshot for reference:

find_real_file.png

 

-Pradeep Sharma

Pradeep,

This doesn't seem to work it appears that when it runs something sees the javascript and complete removes the values put in the description field. Any other ideas?

Actually it looks like this suggestion does work but for some reason one field being mapped into it causes it to bug out and blank out the field. Either way javascript: is the way to go.

Posting this in case anyone in the future sees this. With newer versions of Flow designer using '\n' (or "\n") still works. It's just to execute scripts you'll use the script button when trying to set that value instead of using javascript&colon;

Here's a screenshot from the Set Flow Variable Flow Logic, but it should work for Description as well, which should also be a string field on most ServiceNow records. You can dot walk using fd_data like you would when selecting a data pill.

TristanElmore_0-1684248428302.png