Line breaks in Flow Designer

Cirrus
Kilo Sage

Please can anyone advise what the correct syntax should be to acheive the following in a create task description field using flow.

Requested for: u_requested_for

Contact details: contact_variable

Have scripted the following and tried several variations - both insert correctly on their own but as soon as I try and join them it fails)

 

return('\n' + "Requested for: " + fd_data._1_get_catalog_variables.u_requested_for.getDisplayValue() + '\n'
+ "Contact details: " + fd_data._1_get_catalog_variables.req_contact.getDisplayValue()))
1 ACCEPTED SOLUTION

Bhavya11
Kilo Patron

hi @Cirrus ,

 

can you try something like this 

 

 

var requestedFor = fd_data.trigger.request_item.variables.request_for;
var contactDetails = fd_data.trigger.request_item.variables.short_description;

var details= 'Requested for: ' + requestedFor + '\n' +
                   'Contact details: ' + contactDetails;

return details;

 

 

 

 

 

Please mark helpful & correct answer if it's really worthy for you.

 

Thanks,

BK

 

 

View solution in original post

6 REPLIES 6

Nicholas_Gann
Mega Guru

I'm not sure your return would work as it was written with the string being enclosed in brackets. Also there seemed to be one too many terminating brackets.

 

Try:

 

return '\n' + "Requested for: " + fd_data._1_get_catalog_variables.u_requested_for.getDisplayValue() + '\n'
+ "Contact details: " + fd_data._1_get_catalog_variables.req_contact.getDisplayValue();

 

 

Thankyou, but unfortuantely this threw up an error on save as well (i did correct the two underscores before the get)