cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to include Line Breaker from Long Text box and remove [" "] format from Multiple Choice answer (MS FORM) when sending HTML Email using MS FLOW

I have a couple questions related to sending HTML Email from MS Form values using MS Flow:

 

1. How to include Line Breaker from MS Form Long Text box when sending HTML Email using MS Flow

Currently, it's converting the multi line values as a single line in the email. How do I keep the original format to include linebreaker in the email?

 

2. How to remove [" "] format from MS Form Multiple Choice answer when sending HTML Email using MS Flow

Multivalues are represented in array format, how do I remove this is MS Flow process?

1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Community Champion
Community Champion

Hi @Anonymous 

 

 

for multi choice field use expression

 

replace(replace(replace(dynamiccontentmultichoicefield,'["',''),'"]',''),'","',',')

 

for long text line break 

 

First create a compose action (rename it to NewLine)

and add following expression

decodeUriComponent('%0A')
Capture.PNG

Then in email use expression

 

replace(dynamiccontentlongfield,outputs('NewLine'),'</br>')

 

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

6 REPLIES 6
RezaDorrani
Community Champion
Community Champion

Hi @Anonymous 

 

 

for multi choice field use expression

 

replace(replace(replace(dynamiccontentmultichoicefield,'["',''),'"]',''),'","',',')

 

for long text line break 

 

First create a compose action (rename it to NewLine)

and add following expression

decodeUriComponent('%0A')
Capture.PNG

Then in email use expression

 

replace(dynamiccontentlongfield,outputs('NewLine'),'</br>')

 

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Anonymous
Not applicable

@RezaDorrani, unfortunately this doesn't work. I'm getting literally string output. Could you please advise me?

multichoicemultichoicelongtextlongtext

Hi @Anonymous 

 

You need to use the expression syntax

 

Capture.PNG

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Anonymous
Not applicable

Thank you so much! This is really helpful. Is there some kind of documentation to go through for more advanced flows like this?

Thank you for that! What a relief.

AlexPMayer42
New Member

Reza,

 

This fails if the Multiline Text field is NULL. This expression will first check that it is not NULL prior to trying to make the string change:

 

if(equals(coalesce([FIELDNAME],'NULL'),'NULL'),'',replace([FIELDNAME],outputs('NewLine'),'</br>'))

 

-Alex Mayer

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,342)