cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IoaPan
Frequent Visitor

Line breaks in approval's 'comments' field

Hi everyone,

 

at the end of an approval workflow I want to email all approver comments to the workflow initiator, which are all stored in a String variable.

 

I send the email using a 'send email notification v3', but there are no line breaks in the approver comments (although I can see in the SharePoint list that there are line breaks).

 

I have tried the replace function, but both do not do what I need (the approver comments come without line breaks):

replace(variables('VarApprovalComments'),'\n','<BR>')

 

Has anyone solved this? I also saw another thread related to this.

 

Thanks & best regards,

 

Yannis

 

1 ACCEPTED SOLUTION

Accepted Solutions
IoaPan
Frequent Visitor

I think I found the solution!

 

I saw in Notepad++ that the approval comments text has a CRLF at the end.

 

From this post, I constructed a varCRLF variable with these two characters:

concat(uriComponentToString('%0D'),uriComponentToString('%0A'))

 

In the send email block, I replaced varCRLF with the HTML <BR> tag:

replace(variables('VarApprovalComments'),variables('varCRLF'),'<BR>')

 

and it worked!

View solution in original post

2 REPLIES 2
ChristianAbata
Super User
Super User

hi @IoaPan  if is HTML you could try  with &amp; or &lt;br&gt; to add <br> as text



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
IoaPan
Frequent Visitor

I think I found the solution!

 

I saw in Notepad++ that the approval comments text has a CRLF at the end.

 

From this post, I constructed a varCRLF variable with these two characters:

concat(uriComponentToString('%0D'),uriComponentToString('%0A'))

 

In the send email block, I replaced varCRLF with the HTML <BR> tag:

replace(variables('VarApprovalComments'),variables('varCRLF'),'<BR>')

 

and it worked!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,206)