How to add a new line in the toggle scripting feature of flow designer

Anmol Azhar
Tera Contributor

I am using toggle scripting for a description field of a catalog task and am trying to add a new line between my text. Below is my code and the dashes (--------------) are where I need to add a line break for the text to be on a new line. 

var domainVar = fd_data.trigger.request_item.variables.domain_for_access.getDisplayValue();
var adminType = fd_data.trigger.request_item.variables.admin_type.getDisplayValue();
var reqFor = fd_data.trigger.request_item.requested_for.getDisplayValue();
 
return "CyberArk " + adminType + " access has been approved for " + reqFor + " in the " + domainVar + " domains. Please add " + reqFor + " in the corresponding AD groups per accepted requirements. Below are the available AD groups for access -------------- Domain Admin Groups: CA-Group, CA_Prop, CA_Root -------------- Server Admin Groups: CA_NES, CA_rdm -------------- Following, ensure the user is onboarded with End User Access in CyberArk."

Can someone please assist me with this?
Thank you!

1 ACCEPTED SOLUTION

"Test" + "\n" + "test2"
Regards
Harish

View solution in original post

4 REPLIES 4

Harish KM
Kilo Patron
Kilo Patron

You need to use \n for new line

Regards
Harish

within the quotes or outside of the quotes? can you please provide an example using the code.

"Test" + "\n" + "test2"
Regards
Harish

Thank you! That worked!