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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Replace function adds ...
Power Automate
Unanswered

Replace function adds a backslash to the values

(0) ShareShare
ReportReport
Posted on by 248

Hi, I'm using Power Apps to paste a column of values from Excel into a text box then I send that text to a variable in Power Automate which returns this to the variable in Power Automate: "ABC\nDEF\nGHI"

 

I then remove the "\n" and replace with a comma in a compose action which gives me this: "ABC,DEF,GHI"

Formula used: replace(variables('ALPHABET'),decodeUriComponent('%0A'),',')

 

However I need to have quotes around each value so I add another compose action and use replace and it turns out like this:  

"ABC\",\"DEF\",\"GHI"   why does it add slashes??
Formula used: replace(outputs('Compose_ALPHABET'),',','","')
 
I need the values to look like this: "ABC","DEF","GHI"  

Anyone have any guidance on how to solve this?
Categories:
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @cbernier12 ,

    What is the result if you try to do all in a single operation ? Is there a specific need for 2 separate action ?

    replace(variables('ALPHABET'),decodeUriComponent('%0A'),'","')

    Can you show the results of the set variable (ALPHABET) action from an already run instance ?

  • cbernier12 Profile Picture
    248 on at

    Same results:  

    "ABC\",\"DEF\",\"GHI"
     
    This is what the variable starts with, also had that in the first post too: 
    "value""ABC\nDEF\nGHI"
  • cbernier12 Profile Picture
    248 on at

    I appears Power Apps messes with the character encoding when as CSV list is pasted into a textbox and sent over to Power Automate. Any have a solution for that?  If I convert the list to a string in Power Automate it adda a bunch of "\" so the items.  Super frustrating.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard