web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Removing unwanted char...
Power Automate
Answered

Removing unwanted character output from MS Forms

(0) ShareShare
ReportReport
Posted on by 34

Hi All,

 

I've found some solutions on this forum to replace unwanted characters from MS Forms, but am not getting far with removing the \n characters that get appended to multiple choice responses in MS Forms.

 

Here are some of the other posts that have helped me reach this point:

 

Here is a picture of my flow:

Screen Shot 2021-11-25 at 9.51.52 am.png

 

The compose function is using this expression:

 

 

 

replace(body('Get_response_details')?['re161b12e16c941ba887a822bf85f74d3'],'\n','')

 

 

 

 

I have also tried using the expression directly within the SharePoint update list item connector. In all cases, the replace function is simply ignored and the output is:

 

"Option1\n"

"Option2\n"

Etc...

 

This is a real dealbreaker because the data is being inserted into a SharePoint List calculated column and results in a line break, which breaks the calculated column formula.

 

Any help would be greatly appreciated.

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    fchopo Profile Picture
    8,003 Moderator on at

    Hi @jasonmurphy 

    Could you try this?:

    uriComponentToString(replace(uriComponent(body('Get_response_details')?['re161b12e16c941ba887a822bf85f74d3']), '%0A', ''))

    The UriComponent function returns an uncoded version for a string and replace unsafe characters with escape characters ('%0A' is line break one). The UriComponentToString encodes again the string.

     

    Hope it helps!

    Ferran

     

  • jasonmurphy Profile Picture
    34 on at

    Thank you @fchopo. It worked! Really appreciate it. 🙂

  • Community Power Platform Member Profile Picture
    on at

    Hi @fchopo ,

    Please help me....

    How can I use line break in Join action with the below statement

    json(body('Get_response_details')?['r7cca81fce18242709b9857d74952ae93'])
     
    tn101_0-1652321969998.png

     

    ...

    I want to display the multiple values in email:

    • Banner1
    • Banner2
    • Banner3

    instead of 

    Banner1, Banner2, Banner3

     

  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @Anonymous 

    Create a string variable with a line break and use it in the join action.

    Hope it helps!

    Ferran

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard